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

Function WriteUpper

token/token.go:166–174  ·  view source on GitHub ↗

WriteUpper uses caser to upper case the runes in s and writes to b

(b *strings.Builder, caser Caser, s string)

Source from the content-addressed store, hash-verified

164
165// WriteUpper uses caser to upper case the runes in s and writes to b
166func WriteUpper(b *strings.Builder, caser Caser, s string) {
167 for _, r := range s {
168 if b.Len() == 0 {
169 b.WriteRune(caser.ToTitle(r))
170 } else {
171 b.WriteRune(caser.ToUpper(r))
172 }
173 }
174}
175
176// WriteLower uses caser to lower case the runes in s and writes to b
177func WriteLower(b *strings.Builder, caser Caser, s string) {

Callers 2

writeTokenMethod · 0.92
TestWriteUpperFunction · 0.92

Calls 3

ToTitleMethod · 0.65
ToUpperMethod · 0.65
LenMethod · 0.45

Tested by 1

TestWriteUpperFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…