MCPcopy
hub / github.com/micro-editor/micro / CharacterCountInString

Function CharacterCountInString

internal/util/unicode.go:86–96  ·  view source on GitHub ↗

CharacterCount returns the number of characters in a string Similar to utf8.RuneCountInString but for unicode characters

(str string)

Source from the content-addressed store, hash-verified

84// CharacterCount returns the number of characters in a string
85// Similar to utf8.RuneCountInString but for unicode characters
86func CharacterCountInString(str string) int {
87 s := 0
88
89 for _, r := range str {
90 if !isMark(r) {
91 s++
92 }
93 }
94
95 return s
96}

Callers 11

displayStatusLineMethod · 0.92
displayScrollBarMethod · 0.92
drawNodeMethod · 0.92
LocFromVisualMethod · 0.92
displayBufferMethod · 0.92
scrollToSuggestionMethod · 0.92
LocFromVisualMethod · 0.92
SetActiveMethod · 0.92
ApplyDiffMethod · 0.92
benchEditFunction · 0.92
CycleAutocompleteMethod · 0.92

Calls 1

isMarkFunction · 0.70

Tested by 1

benchEditFunction · 0.74