sprig
sprig copied to clipboard
Implementation of CamelCase is actually returning PascalCase
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
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!
For people coming here looking for an answer for helm specific:
{{ . | camelcase | untitle }}