Is there an alternative of StringCases.jl that changes string cases?

I want to switch strings between camelCase, PascalCase, snake_case, etc. I found one package StringCases.jl but it is old and seems to be unmaintained. Is there any alternative?

Seems like the easiest path might be to make a PR to update that package. @djsegal is pretty active and will likely review and accept an update. There’s even a PR to start from: Start upgrading StringCases for Julia >= 1.0 by tencnivel · Pull Request #3 · djsegal/StringCases.jl · GitHub.

4 Likes

Just made a PR to add it to the General packages list:

Guess I didn’t maintain it cause people told me it was an unneeded package at the time?

Glad it found some people who wanted it though :slight_smile:

2 Likes

I know this is an old post, but I believe my reply would be useful to anyone else that comes across this post.

I have created a package GitHub - acxz/StringCases.jl: Define, validate, and convert string cases which has more features for handling the conversion between string cases, both predefined and custom.

The name choice may be poor in lieu of the existing registered package, but when I created the package I thought the name was a proper representation of the package. Feel free to take a look at the Example Usage section of the README.md for a concise example.

3 Likes

@StefanKarpinski @djsegal do you two think that the package I have created can supersede yours (@djsegal) in the General Registry? It is more powerful and handles the cases that already exists in the older StringCases.jl.

Yes, I think we can do that. I haven’t seen @djsegal around for a while but let’s see if he chimes in. If not we can replace the old version with yours. The procedure is to give it the same uuid and a new major version number. Ping me here or on slack in a few weeks and we can do it.

3 Likes

Sure?

Guess I’m a little scared about a lpad scenario with people who use the original package?

But doesn’t matter to me. The API seems a little complicated? I realize all the functionality is there, but is there a way to use some of the previous function names

1 Like