次の方法で共有


ITextDifferencingService2.DiffStrings Method

Definition

Computes the differences between two strings, using the given difference options.

public Microsoft.VisualStudio.Text.Differencing.IHierarchicalDifferenceCollection DiffStrings (string left, string right, Microsoft.VisualStudio.Text.Differencing.StringDifferenceOptions differenceOptions, System.Collections.Generic.IEqualityComparer<string>? comparer);
abstract member DiffStrings : string * string * Microsoft.VisualStudio.Text.Differencing.StringDifferenceOptions * System.Collections.Generic.IEqualityComparer<string> -> Microsoft.VisualStudio.Text.Differencing.IHierarchicalDifferenceCollection
Public Function DiffStrings (left As String, right As String, differenceOptions As StringDifferenceOptions, comparer As IEqualityComparer(Of String)) As IHierarchicalDifferenceCollection

Parameters

left
String

The left string. In most cases this is the the "old" string.

right
String

The right string. In most cases this is the "new" string.

differenceOptions
StringDifferenceOptions

The options to use in differencing

comparer
IEqualityComparer<String>

An equality comparer that, if non-null, determines if two strings should be considered equal and overrides other comparison options (e.g. IgnoreTrimWhiteSpace)

Returns

A hierarchical collection of differences.

Applies to