Diff
|
The DiffMatchPatch type exposes the following members.
Name | Description | |
---|---|---|
DiffMatchPatch | Initializes a new instance of the DiffMatchPatch class |
Name | Description | |
---|---|---|
DiffBisect | Find the 'middle snake' of a diff, split the problem in two and return the recursively constructed diff. See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations. | |
DiffCharsToLines | Rehydrate the text in a diff from a string of line hashes to real lines of text. | |
DiffCleanupEfficiency | Reduce the number of edits by eliminating operationally trivial equalities. | |
DiffCleanupMerge | Reorder and merge like edit sections. Merge equalities. Any edit section can move as long as it doesn't cross an equality. | |
DiffCleanupSemantic | Reduce the number of edits by eliminating semantically trivial equalities. | |
DiffCleanupSemanticLossless | Look for single edits surrounded on both sides by equalities which can be shifted sideways to align the edit to a word boundary. e.g: The cat came. -> The cat came. | |
DiffCommonOverlap | Determine if the suffix of one string is the prefix of another. | |
DiffCommonPrefix | Determine the common prefix of two strings. | |
DiffCommonSuffix | Determine the common suffix of two strings. | |
DiffFromDelta | Given the original text1, and an encoded string which describes the operations required to transform text1 into text2, compute the full diff. | |
DiffHalfMatch | Do the two texts share a Substring which is at least half the length of the longer text? This speedup can produce non-minimal diffs. | |
DiffLevenshtein | Compute the Levenshtein distance; the number of inserted, deleted or substituted characters. | |
DiffLinesToChars | Split two texts into a list of strings. Reduce the texts to a string of hashes where each Unicode character represents one line. | |
DiffMain(String, String) | Find the differences between two texts. Run a faster, slightly less optimal diff. This method allows the 'checklines' of DiffMain() to be optional. Most of the time checklines is wanted, so default to true. | |
DiffMain(String, String, Boolean) | Find the differences between two texts. | |
DiffPrettyHtml | Convert a Diff list into a pretty HTML report. | |
DiffText1 | Compute and return the source text (all equalities and deletions). | |
DiffText2 | Compute and return the destination text (all equalities and insertions). | |
DiffToDelta | Crush the diff into an encoded string which describes the operations required to transform text1 into text2. E.g. =3\t-2\t+ing -> Keep 3 chars, delete 2 chars, insert 'ing'. Operations are tab-separated. Inserted text is escaped using %xx notation. | |
DiffXIndex | loc is a location in text1, compute and return the equivalent location in text2. e.g. "The cat" vs "The big cat", 1->1, 5->8 | |
EncodeURI | Encodes a string with URI-style % escaping. Compatible with JavaScript's encodeURI function. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
GetHashCode | Serves as the default hash function. (Inherited from Object) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
MatchAlphabet | Initialize the alphabet for the Bitap algorithm. | |
MatchBitap | Locate the best instance of 'pattern' in 'text' near 'loc' using the Bitap algorithm. Returns -1 if no match found. | |
MatchMain | Locate the best instance of 'pattern' in 'text' near 'loc'. Returns -1 if no match found. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
PatchAddContext | Increase the context until it is unique, but don't let the pattern expand beyond MatchMaxBits. | |
PatchAddPadding | Add some padding on text start and end so that edges can match something. Intended to be called only from within PatchApply. | |
PatchApply | Merge a set of patches onto the text. Return a patched text, as well as an array of true/false values indicating which patches were applied. | |
PatchDeepCopy | Given an array of patches, return another array that is identical. | |
PatchFromText | Parse a textual representation of patches and return a List of Patch objects. | |
PatchMake(ListDiff) | Compute a list of patches to turn text1 into text2. text1 will be derived from the provided diffs. | |
PatchMake(String, ListDiff) | Compute a list of patches to turn text1 into text2. text2 is not provided, diffs are the delta between text1 and text2. | |
PatchMake(String, String) | Compute a list of patches to turn text1 into text2. A set of diffs will be computed. | |
PatchMake(String, String, ListDiff) | Obsolete. Compute a list of patches to turn text1 into text2. text2 is ignored, diffs are the delta between text1 and text2. | |
PatchSplitMax | Look through the patches and break up any which are longer than the maximum limit of the match algorithm. Intended to be called only from within PatchApply. | |
PatchToText | Take a list of patches and return a textual representation. | |
ToString | Returns a string that represents the current object. (Inherited from Object) |
Name | Description | |
---|---|---|
DiffEditCost | Cost of an empty edit operation in terms of edit characters. | |
DiffTimeout | Number of seconds to map a diff before giving up (0 for infinity). | |
MatchDistance | How far to search for a match (0 = exact location, 1000+ = broad match). A match this many characters away from the expected location will add 1.0 to the score (0.0 is a perfect match). | |
MatchThreshold | At what point is no match declared (0.0 = perfection, 1.0 = very loose). | |
PatchDeleteThreshold | When deleting a large block of text (over ~64 characters), how close do the contents have to be to match the expected contents. (0.0 = perfection, 1.0 = very loose). Note that MatchThreshold controls how closely the end points of a delete need to match. | |
PatchMargin | Chunk size for context length. |
Name | Description | |
---|---|---|
GetEnumValueOrDefault |
Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) | |
GetEnumValueOrDefaultT |
Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) |