-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
builtin: fix snake_to_camel
when passing a SCREAMING_SNAKE_CASE
string
#21722
builtin: fix snake_to_camel
when passing a SCREAMING_SNAKE_CASE
string
#21722
Conversation
Related to this and potential simplifications, would a |
We have u8.is_capital/0 already, which does c >= |
Bug in code: assert '_ISspace'.camel_to_snake() == '_i_sspace' |
Good catch. Thanks a lot for the test cases @kbkpbot |
Why I would have expected |
Good question. From the short research I did before, the initial implementation (without extracting handling of the first characters to reduce the load in the loop) was very similar to the implementation at https://github.com/iancoleman/strcase. So the initial impl and Go's strcase gives |
Ref.: #21691 (comment)