Compares two strings
public IList<TextDifference> CompareText(
IList<string> texts
)
texts
List of strings to compare.
A list of TextDifferences.
Exactly two strings must be provided to this method.
using Leadtools.Document;
using Leadtools.Document.Compare;
using Leadtools;
public void CompareTextStringExample()
{
var stringList = new List<string>()
{
"Hello World",
"Goodbye World"
};
var comparer = new DocumentComparer();
var diffs = comparer.CompareText(stringList);
foreach(TextDifference diff in diffs)
{
Console.WriteLine($"Operations: {diff.Operation}");
Console.WriteLine($"Text: {diff.Text}");
Console.WriteLine("--------");
}
}