MCPcopy Create free account
hub / github.com/cogentcore/core / Dump

Method Dump

texteditor/difflib/difflib.go:596–610  ·  view source on GitHub ↗
(tag string, x []string, low int, high int)

Source from the content-addressed store, hash-verified

594}
595
596func (d *Differ) Dump(tag string, x []string, low int, high int) (out []string) {
597 // Generate comparison results for a same-tagged range.
598 sout := d.StructuredDump(tag[0], x, low, high)
599 out = make([]string, len(sout))
600 var bld strings.Builder
601 bld.Grow(1024)
602 for i, line := range sout {
603 bld.Reset()
604 bld.WriteByte(line.Tag)
605 bld.WriteString(" ")
606 bld.WriteString(line.Line)
607 out[i] = bld.String()
608 }
609 return out
610}
611
612func (d *Differ) PlainReplace(a []string, alo int, ahi int, b []string, blo int, bhi int) (out []string, err error) {
613 if !(alo < ahi) || !(blo < bhi) { // assertion

Callers 4

TestDifferDumpFunction · 0.95
CompareMethod · 0.95
PlainReplaceMethod · 0.95
fancyHelperMethod · 0.95

Calls 4

StructuredDumpMethod · 0.95
WriteStringMethod · 0.80
StringMethod · 0.65
ResetMethod · 0.45

Tested by 1

TestDifferDumpFunction · 0.76