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

Function count_leading

texteditor/difflib/difflib.go:523–531  ·  view source on GitHub ↗
(line string, ch byte)

Source from the content-addressed store, hash-verified

521}
522
523func count_leading(line string, ch byte) (count int) {
524 // Return number of `ch` characters at the start of `line`.
525 count = 0
526 n := len(line)
527 for (count < n) && (line[count] == ch) {
528 count++
529 }
530 return count
531}
532
533type DiffLine struct {
534 Tag byte

Callers 1

QFormatMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected