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

Method NumBlines

texteditor/text/diff.go:114–120  ·  view source on GitHub ↗

NumBlines returns the total number of Blines source code in the patch

()

Source from the content-addressed store, hash-verified

112
113// NumBlines returns the total number of Blines source code in the patch
114func (pt Patch) NumBlines() int {
115 nl := 0
116 for _, pr := range pt {
117 nl += len(pr.Blines)
118 }
119 return nl
120}
121
122// ToPatch creates a Patch list from given Diffs output from DiffLines and the
123// b strings from which the needed lines of source are copied.

Callers 1

TestDiffFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestDiffFunction · 0.64