commons-text
commons-text copied to clipboard
TEXT-217: Add SnakeCase Parsing
This implementation adds a CasedString class that can convert between several different formats.
Initially supported formats:
- Camel case identifies strings like 'CamelCase'.
- Snake case identifies strings like 'Snake_Case'
- Kebab case identifies strings like 'kebab-case'
- Phrase case identifies phrases of words like 'phrase case'
- Dot case identifies strings of words like 'dot.case'
CasedString does not convert the character case except where mandated by the case. so SnakeCase
converted to kabob case is Snake-Case
and kabob-case
converted to snake case is kabobCase
Other utilities are available to modify the characte case.