mirror of
https://github.com/godotengine/godot.git
synced 2025-01-17 07:23:06 +00:00
Merge pull request #12932 from willnationsdev/capitalize-enhancement
Fixes a bug where capitalize didn't work with camelCase names
This commit is contained in:
commit
219d735eb2
@ -564,7 +564,7 @@ void String::erase(int p_pos, int p_chars) {
|
||||
|
||||
String String::capitalize() const {
|
||||
|
||||
String aux = this->replace("_", " ").to_lower();
|
||||
String aux = this->camelcase_to_underscore(true).replace("_", " ").strip_edges();
|
||||
String cap;
|
||||
for (int i = 0; i < aux.get_slice_count(" "); i++) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user