-
-
Notifications
You must be signed in to change notification settings - Fork 21.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
Inconsistency: "1a".to_snake_case() == "1a"
, but "1aa".to_snake_case() == "1_aa"
.
#86734
Comments
"1a".to_snake_case() == "1a"
, but "1aa".to_snake_case() == "1_aa"
. Same problem with capitalize()
."1a".to_snake_case() == "1a"
, but "1aa".to_snake_case() == "1_aa"
.
This is made to handle "2D"/"3D" and "str2var", "var2bytes", etc. (replaced by Lines 1060 to 1063 in 07b8860
godot/tests/core/string/test_string.h Lines 1312 to 1337 in 07b8860
|
A few small examples for the casing may do the trick, like in |
I updated #86639 with some examples for this, as well. Feel free to suggest examples if necessary. |
Closes godotengine/godot-docs#8043 Closes godotengine/godot-docs#8044 Mitigates godotengine/godot-docs#8190 Closes godotengine#86734 (cherry picked from commit 46b0f3e)
Closes godotengine/godot-docs#8043 Closes godotengine/godot-docs#8044 Mitigates godotengine/godot-docs#8190 Closes godotengine#86734 (cherry picked from commit 46b0f3e)
Tested versions
Reproducible in:
3.5.3.stable
usingcapitalize
4.2.1.stable
usingcapitalize
andto_snake_case
.System information
Linux on kernel 6.6.7-arch1-1
Issue description
Output:
Expected:
Steps to reproduce
https://gd.tumeo.space/?KYDwLsB2AmDOAEA5A9tYAodAzArpAxvAPoBOwAhtAJ4AUAlAFzoCQADiQJaRg0BEAjOV4A6fOVYcw5ADYcAXsHp0W7LjwHkho8ZJnzFdZW07c+gkWGRFYkcgGtgRMbANHVpjVsvXbDp+RclIA
Minimal reproduction project (MRP)
to_snake_case_4.2.1.zip
The text was updated successfully, but these errors were encountered: