sprig icon indicating copy to clipboard operation
sprig copied to clipboard

Implementation of CamelCase is actually returning PascalCase

Open ghostsquad opened this issue 3 years ago • 2 comments

Expected Behavior

foo-bar -> fooBar

Actual Behavior

foo-bar -> FooBar

Rationale

The camelcase function should return the string with the first letter being lowercase. A new function should be introduced, pascalcase that returns a string where the first letter is uppercase.

https://docs.microsoft.com/en-us/archive/blogs/brada/history-around-pascal-casing-and-camel-casing

https://www.theserverside.com/answer/Pascal-case-vs-camel-case-Whats-the-difference https://khalilstemmler.com/blogs/camel-case-snake-case-pascal-case/ https://betterprogramming.pub/string-case-styles-camel-pascal-snake-and-kebab-case-981407998841 https://stackoverflow.com/questions/41768733/camel-case-and-pascal-case-mistake

Related to #154

ghostsquad avatar Apr 01 '22 00:04 ghostsquad

Hello everyone 👋,

I wanted to let you know that this issue has been addressed in the fork of this project at go-sprout/sprout. The fix has been implemented starting from version v0.4.0.

For those looking for a solution, I recommend checking out the latest releases of the fork. This should help address the issue discussed in this thread.

Thank you!

42atomys avatar May 16 '24 01:05 42atomys

For people coming here looking for an answer for helm specific:

{{ . | camelcase | untitle }}

fe-ax avatar Dec 03 '24 15:12 fe-ax