MCPcopy
hub / github.com/tinyauthapp/tinyauth / Capitalize

Function Capitalize

internal/utils/string_utils.go:7–12  ·  view source on GitHub ↗
(str string)

Source from the content-addressed store, hash-verified

5)
6
7func Capitalize(str string) string {
8 if len(str) == 0 {
9 return ""
10 }
11 return strings.ToUpper(string([]rune(str)[0])) + string([]rune(str)[1:])
12}
13
14func CoalesceToString(value any) string {
15 switch v := value.(type) {

Callers 8

TestCapitalizeFunction · 0.92
MiddlewareMethod · 0.92
oauthCallbackHandlerMethod · 0.92
loginHandlerMethod · 0.92
totpHandlerMethod · 0.92
InitMethod · 0.92
SetupMethod · 0.92
createOidcClientCmdFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestCapitalizeFunction · 0.74