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)
| 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. |
| 163 | func 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. |
no outgoing calls
no test coverage detected
searching dependent graphs…