DiffLinesToRunes splits two texts into a list of runes.
(text1, text2 string)
| 396 | |
| 397 | // DiffLinesToRunes splits two texts into a list of runes. |
| 398 | func (dmp *DiffMatchPatch) DiffLinesToRunes(text1, text2 string) ([]rune, []rune, []string) { |
| 399 | chars1, chars2, lineArray := dmp.diffLinesToStrings(text1, text2) |
| 400 | return []rune(chars1), []rune(chars2), lineArray |
| 401 | } |
| 402 | |
| 403 | // DiffCharsToLines rehydrates the text in a diff from a string of line hashes to real lines of text. |
| 404 | func (dmp *DiffMatchPatch) DiffCharsToLines(diffs []Diff, lineArray []string) []Diff { |