From 238d488a045444ef49d88fb2e93122a90e092f2b Mon Sep 17 00:00:00 2001 From: Will Nations Date: Tue, 14 Nov 2017 14:32:37 -0600 Subject: [PATCH] Fixed a bug where capitalize didn't work with camelCase names --- core/ustring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++) {