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

Function LowercaseFirstCharacter

pkg/codegen/utils.go:192–199  ·  view source on GitHub ↗

LowercaseFirstCharacter Lowercases 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

190// LowercaseFirstCharacter Lowercases the first character in a string. This assumes UTF-8, so we have
191// to be careful with unicode, don't treat it as a byte array.
192func LowercaseFirstCharacter(str string) string {
193 if str == "" {
194 return ""
195 }
196 runes := []rune(str)
197 runes[0] = unicode.ToLower(runes[0])
198 return string(runes)
199}
200
201// Lowercase the first upper characters in a string for case of abbreviation.
202// This assumes UTF-8, so we have to be careful with unicode, don't treat it as a byte array.

Callers 2

detectPackageNameFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected