MCPcopy Create free account
hub / github.com/sergi/go-diff / DiffLinesToRunes

Method DiffLinesToRunes

diffmatchpatch/diff.go:398–401  ·  view source on GitHub ↗

DiffLinesToRunes splits two texts into a list of runes.

(text1, text2 string)

Source from the content-addressed store, hash-verified

396
397// DiffLinesToRunes splits two texts into a list of runes.
398func (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.
404func (dmp *DiffMatchPatch) DiffCharsToLines(diffs []Diff, lineArray []string) []Diff {

Callers 3

diffLineModeMethod · 0.95

Calls 1

diffLinesToStringsMethod · 0.95