DiffUtils
Overview
DiffUtils is a class in Aspose.PDF FOSS for .NET.
Text helpers used by the diff engine: common prefix/suffix extraction and re-assembly of the source / destination text from a list of DiffOperations.
This class provides 6 methods for working with DiffUtils objects in .NET programs.
Available methods include: AssemblyDestinationText, AssemblySourceText, FindCommonEndParts, FindCommonStartParts.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Methods
| Signature | Description |
|---|---|
FindCommonStartParts(first: string?, second: string?) | The longest common prefix shared by first and second (empty when they differ from the first character). |
FindCommonStartParts(first: StringBuilder?, second: StringBuilder?) | StringBuilder overload of FindCommonStartParts(string,string). |
FindCommonEndParts(first: string?, second: string?, startIndex: int) | The longest common suffix shared by first and second, without matching further back than index startIndex in first (so the result length is bounded by first.Length - startIndex). |
FindCommonEndParts(first: StringBuilder?, second: StringBuilder?) | StringBuilder overload of FindCommonEndParts(string,string,int) with no lower bound (startIndex = 0). |
AssemblySourceText(diffs: IEnumerable<DiffOperation>?) | Rebuild the original (source) text: the concatenation of every Equal and Delete run. |
AssemblyDestinationText(diffs: IEnumerable<DiffOperation>?) | Rebuild the modified (destination) text: the concatenation of every Equal and Insert run. |