메소드 |
설명 |
|
diff_charsToLines ( &$diffs, $lineArray ) |
Rehydrate the text in a diff from a string of line hashes to real lines of
text. |
|
diff_cleanupEfficiency ( &$diffs ) |
Reduce the number of edits by eliminating operationally trivial equalities. |
|
diff_cleanupMerge ( &$diffs ) |
Reorder and merge like edit sections. Merge equalities. |
|
diff_cleanupSemantic ( &$diffs ) |
Reduce the number of edits by eliminating semantically trivial equalities. |
|
diff_cleanupSemanticLossless ( &$diffs ) |
Look for single edits surrounded on both sides by equalities
which can be shifted sideways to align the edit to a word boundary. |
|
diff_cleanupSemanticScore ( $one, $two ) : {number} |
Given two strings, compute a score representing whether the internal
boundary falls on logical boundaries. |
|
diff_commonPrefix ( $text1, $text2 ) : {number} |
Determine the common prefix of two strings |
|
diff_commonSuffix ( $text1, $text2 ) : {number} |
Determine the common suffix of two strings |
|
diff_compute ( $text1, $text2, $checklines ) : {Array.>} |
Find the differences between two texts. Assumes that the texts do not
have any common prefix or suffix. |
|
diff_fromDelta ( $text1, $delta ) : {Array.>} |
Given the original text1, and an encoded string which describes the
operations required to transform text1 into text2, compute the full diff. |
|
diff_halfMatch ( $text1, $text2 ) : {Array.?} |
Do the two texts share a mb_substring which is at least half the length of the
longer text? |
|
diff_halfMatchI ( $longtext, $shorttext, $i ) : {Array.?} |
Does a mb_substring of shorttext exist within longtext such that the mb_substring
is at least half the length of longtext?
Closure, but does not reference any external variables. |
|
diff_levenshtein ( $diffs ) : {number} |
Compute the Levenshtein distance; the number of inserted, deleted or
substituted characters. |
|
diff_linesToChars ( $text1, $text2 ) : {Array.>} |
Split two texts into an array of strings. Reduce the texts to a string of
hashes where each Unicode character represents one line. |
|
diff_linesToCharsMunge ( $text, &$lineArray, &$lineHash ) : {string} |
Split a text into an array of strings. Reduce the texts to a string of
hashes where each Unicode character represents one line. |
|
diff_main ( $text1, $text2, $checklines = true ) : {Array.>} |
Find the differences between two texts. Simplifies the problem by stripping
any common prefix or suffix off the texts before diffing. |
|
diff_map ( $text1, $text2 ) : {Array.>?} |
Explore the intersection points between the two texts. |
|
diff_path1 ( $v_map, $text1, $text2 ) : {Array.>} |
Work from the middle back to the start to determine the path. |
|
diff_path2 ( $v_map, $text1, $text2 ) : {Array.>} |
Work from the middle back to the end to determine the path. |
|
diff_prettyHtml ( $diffs ) : {string} |
Convert a diff array into a pretty HTML report. |
|
diff_text1 ( $diffs ) : {string} |
Compute and return the source text (all equalities and deletions). |
|
diff_text2 ( $diffs ) : {string} |
Compute and return the destination text (all equalities and insertions). |
|
diff_toDelta ( $diffs ) : {string} |
Crush the diff into an encoded string which describes the operations
required to transform text1 into text2. |
|
diff_xIndex ( $diffs, $loc ) : {number} |
loc is a location in text1, compute and return the equivalent location in
text2. |
|
match_alphabet ( $pattern ) : {Object} |
Initialise the alphabet for the Bitap algorithm. |
|
match_bitap ( $text, $pattern, $loc ) : {number} |
Locate the best instance of 'pattern' in 'text' near 'loc' using the
Bitap algorithm. |
|
match_bitapScore ( $e, $x, $pattern, $loc ) : {number} |
Compute and return the score for a match with e errors and x location. |
|
match_main ( $text, $pattern, $loc ) : {number} |
Locate the best instance of 'pattern' in 'text' near 'loc'. |
|
patch_addContext ( $patch, $text ) |
Increase the context until it is unique,
but don't let the pattern expand beyond Match_MaxBits. |
|
patch_addPadding ( &$patches ) : {string} |
Add some padding on text start and end so that edges can match something. |
|
patch_apply ( $patches, $text ) : {Array.>} |
Merge a set of patches onto the text. Return a patched text, as well
as a list of true/false values indicating which patches were applied. |
|
patch_deepCopy ( $patches ) : {Array.} |
Given an array of patches, return another array that is identical. |
|
patch_fromText ( $textline ) : {Array.} |
Parse a textual representation of patches and return a list of patch objects. |
|
patch_make ( $a, $opt_b = null, $opt_c = null ) : {Array.} |
Compute a list of patches to turn text1 into text2. |
|
patch_splitMax ( &$patches ) |
Look through the patches and break up any which are longer than the maximum
limit of the match algorithm. |
|
patch_toText ( $patches ) : {string} |
Take a list of patches and return a textual representation. |
|