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

Method DiffBisect

diffmatchpatch/diff.go:256–259  ·  view source on GitHub ↗

DiffBisect finds the 'middle snake' of a diff, split the problem in two and return the recursively constructed diff. If an invalid UTF-8 sequence is encountered, it will be replaced by the Unicode replacement character. See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.

(text1, text2 string, deadline time.Time)

Source from the content-addressed store, hash-verified

254// If an invalid UTF-8 sequence is encountered, it will be replaced by the Unicode replacement character.
255// See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.
256func (dmp *DiffMatchPatch) DiffBisect(text1, text2 string, deadline time.Time) []Diff {
257 // Unused in this code, but retained for interface compatibility.
258 return dmp.diffBisect([]rune(text1), []rune(text2), deadline)
259}
260
261// diffBisect finds the 'middle snake' of a diff, splits the problem in two and returns the recursively constructed diff.
262// See Myers's 1986 paper: An O(ND) Difference Algorithm and Its Variations.

Callers 1

TestDiffBisectFunction · 0.80

Calls 1

diffBisectMethod · 0.95

Tested by 1

TestDiffBisectFunction · 0.64