(s string)
| 322 | } |
| 323 | |
| 324 | func replaceInitialism(s string) string { |
| 325 | // These strings do not apply CamelCase |
| 326 | // Do not do CamelCase when these characters match when the preceding character is lowercase |
| 327 | return targetWordRegex.ReplaceAllStringFunc(s, func(s string) string { |
| 328 | // If the preceding character is lowercase, do not do CamelCase |
| 329 | if unicode.IsLower(rune(s[0])) { |
| 330 | return s |
| 331 | } |
| 332 | return strings.ToUpper(s) |
| 333 | }) |
| 334 | } |
| 335 | |
| 336 | // mediaTypeToCamelCase converts a media type to a PascalCase representation |
| 337 | func mediaTypeToCamelCase(s string) string { |
no outgoing calls