MCPcopy Create free account
hub / github.com/chanced/caps / WriteSplitLower

Function WriteSplitLower

token/token.go:107–116  ·  view source on GitHub ↗

WriteSplitLower writes all strings in elems separated by sep and written as lower case

(b *strings.Builder, caser Caser, sep string, elems ...string)

Source from the content-addressed store, hash-verified

105
106// WriteSplitLower writes all strings in elems separated by sep and written as lower case
107func WriteSplitLower(b *strings.Builder, caser Caser, sep string, elems ...string) {
108 for _, s := range elems {
109 for _, r := range s {
110 if b.Len() > 0 && len(sep) > 0 {
111 b.WriteString(sep)
112 }
113 b.WriteRune(caser.ToLower(r))
114 }
115 }
116}
117
118// WriteSplitUpper writes all runes in elems separated by sep and written as lower case
119func WriteSplitLowerRunes(b *strings.Builder, caser Caser, sep string, s []rune) {

Callers 1

TestWriteSplitLowerFunction · 0.92

Calls 2

ToLowerMethod · 0.65
LenMethod · 0.45

Tested by 1

TestWriteSplitLowerFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…