MCPcopy
hub / github.com/pocketbase/pocketbase / UcFirst

Function UcFirst

tools/inflector/inflector.go:13–21  ·  view source on GitHub ↗

UcFirst converts the first character of a string into uppercase.

(str string)

Source from the content-addressed store, hash-verified

11
12// UcFirst converts the first character of a string into uppercase.
13func UcFirst(str string) string {
14 if str == "" {
15 return ""
16 }
17
18 s := []rune(str)
19
20 return string(unicode.ToUpper(s[0])) + string(s[1:])
21}
22
23// Columnify strips invalid db identifier characters.
24func Columnify(str string) string {

Callers 3

TestUcFirstFunction · 0.92
newDynamicModelFunction · 0.92
SentenizeFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestUcFirstFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…