MCPcopy Index your code
hub / github.com/oapi-codegen/oapi-codegen / UppercaseFirstCharacter

Function UppercaseFirstCharacter

pkg/codegen/utils.go:163–170  ·  view source on GitHub ↗

UppercaseFirstCharacter Uppercases the first character in a string. This assumes UTF-8, so we have to be careful with unicode, don't treat it as a byte array.

(str string)

Source from the content-addressed store, hash-verified

161// UppercaseFirstCharacter Uppercases the first character in a string. This assumes UTF-8, so we have
162// to be careful with unicode, don't treat it as a byte array.
163func UppercaseFirstCharacter(str string) string {
164 if str == "" {
165 return ""
166 }
167 runes := []rune(str)
168 runes[0] = unicode.ToUpper(runes[0])
169 return string(runes)
170}
171
172// Uppercase the first character in a identifier with pkg name. This assumes UTF-8, so we have
173// to be careful with unicode, don't treat it as a byte array.

Callers 8

genResponseTypeNameFunction · 0.85
GetValuesMethod · 0.85
MethodMethod · 0.85
serverObjectDefinitionsFunction · 0.85
serverURLEnumKeysFunction · 0.85
GoVariableNameMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…