On Sat, 7 Dec 2019 at 17:05, Bryan Rickman <bryan.rick...@gmail.com> wrote:
> I recently used the text.CaseUtils for converting to camelCase and > PascalCase. I also needed to convert to snake_case and kebab-case, and > ended up writing my own code for that (I wasn't really a big fan of other > utility options out there). Would it be well received if I submitted a PR > for adding that support to CaseUtils? If so, any recommendations on what to > include or not include? > Is there a need for kebab-case in Java? The hyphen is not valid in Java identifiers; indeed many other languages don't allow them either. I'm not sure that it's worth adding snake_case either. AFAICT it's trivial: string.replaceAll(" ", "_") (similarly for kebab-case) Or is it really more complicated than that? Seems to me that the cost outweighs the benefits in these cases.