确定两个字符串之间的文本差异。
命名空间: Microsoft.SharePoint.Utilities
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Shared Function Diff ( _
str1 As String, _
str2 As String, _
maxDifferences As Integer _
) As String
用法
Dim str1 As String
Dim str2 As String
Dim maxDifferences As Integer
Dim returnValue As String
returnValue = SPDiffUtility.Diff(str1, str2, _
maxDifferences)
public static string Diff(
string str1,
string str2,
int maxDifferences
)
参数
str1
类型:System.String原始字符串。
str2
类型:System.String已更改的字符串。
maxDifferences
类型:System.Int3232 位整数表示的最大差异数来查找。
返回值
类型:System.String
指定包含 HTML 标记,指示插入、 删除或更改过的文本的字符串合并的版本。