DiffMain finds the differences between two texts. The checklines flag is a speedup: if false, don't run a line-level diff first to identify the changed areas; if true, run a faster, slightly less optimal diff. If an invalid UTF-8 sequence is encountered, it will be replaced by the Unicode replacemen
(text1, text2 string, checklines bool)
| 83 | // The checklines flag is a speedup: if false, don't run a line-level diff first to identify the changed areas; if true, run a faster, slightly less optimal diff. |
| 84 | // If an invalid UTF-8 sequence is encountered, it will be replaced by the Unicode replacement character. |
| 85 | func (dmp *DiffMatchPatch) DiffMain(text1, text2 string, checklines bool) []Diff { |
| 86 | return dmp.DiffMainRunes([]rune(text1), []rune(text2), checklines) |
| 87 | } |
| 88 | |
| 89 | // DiffMainRunes finds the differences between two rune sequences. |
| 90 | // The checklines flag is a speedup: if false, don't run a line-level diff first to identify the changed areas; if true, run a faster, slightly less optimal diff. |