You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Ratul Sharker <sh...@gmail.com> on 2022/06/22 11:12:49 UTC
Support for converting string to snake case.
Hi There,
Good evening. Lately I was in need of an operation to convert a camel case
string into a snake case string. Searching in google forwarded me to
"org.apache.commons.text.CaseUtils" which has `toCamelCase(...)`.
I want to contribute my implementation of `toSnakeCase(...)` similar to
`toCamelCase(...)`. Does this add any value in `CaseUtils` ?
Please let me know your thoughts.
Thanks in advance,
Ratul Sharker
Re: Support for converting string to snake case.
Posted by Gary Gregory <ga...@gmail.com>.
Hard to say without seeing a PR. I expect that the code would support
generating foo_bar (for variables) as well as FOO_BAR (for constants).
Gary
Gary
On Wed, Jun 22, 2022, 07:38 Ratul Sharker <sh...@gmail.com>
wrote:
> Hi There,
>
> Good evening. Lately I was in need of an operation to convert a camel case
> string into a snake case string. Searching in google forwarded me to
> "org.apache.commons.text.CaseUtils" which has `toCamelCase(...)`.
>
> I want to contribute my implementation of `toSnakeCase(...)` similar to
> `toCamelCase(...)`. Does this add any value in `CaseUtils` ?
>
> Please let me know your thoughts.
>
>
> Thanks in advance,
> Ratul Sharker
>