MCPcopy Create free account
hub / github.com/g3n/engine / StrCount

Function StrCount

text/str.go:8–15  ·  view source on GitHub ↗

StrCount returns the number of runes in the specified string

(s string)

Source from the content-addressed store, hash-verified

6
7// StrCount returns the number of runes in the specified string
8func StrCount(s string) int {
9
10 count := 0
11 for range s {
12 count++
13 }
14 return count
15}
16
17// StrFind returns the start and length of the rune at the
18// specified position in the string

Callers 7

CursorPosMethod · 0.92
CursorRightMethod · 0.92
CursorEndMethod · 0.92
CursorDeleteMethod · 0.92
CursorInputMethod · 0.92
onMouseMethod · 0.92
DrawTextCaretMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected