diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-11-17 00:28:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-17 00:28:18 +0100 |
commit | 219d735eb246d83a96b26be83f8967200b035ab9 (patch) | |
tree | 3f6ed0fadb572c67ac461efb2a1a2770517f35da /core | |
parent | 49cea443a9331e7d69a54856035249c9508d9bc1 (diff) | |
parent | 238d488a045444ef49d88fb2e93122a90e092f2b (diff) |
Merge pull request #12932 from willnationsdev/capitalize-enhancement
Fixes a bug where capitalize didn't work with camelCase names
Diffstat (limited to 'core')
-rw-r--r-- | core/ustring.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index 415494ddc8..7c3a784c5b 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -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++) { |