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)
| 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. |
| 192 | func 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. |
no outgoing calls
no test coverage detected