diff options
author | chris.clst <christophe.claustre.31@gmail.com> | 2021-11-14 03:23:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-14 03:23:22 +0100 |
commit | 038be68649ca60d4a2ffb3c05bdd3cc8ec4841f4 (patch) | |
tree | 29dfaacbcab32b7915743a5959f57b05d7816c31 /core/string/ustring.cpp | |
parent | cc39ba5509263346f33894be3a2c84580c1168a9 (diff) | |
parent | ed300d7be536b1ec325ba77521eceee73dd0e5fb (diff) |
Merge branch 'godotengine:master' into bugfix_shader_compile_spirv_from_source
Diffstat (limited to 'core/string/ustring.cpp')
-rw-r--r-- | core/string/ustring.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index 8d6da31cf3..4798cab641 100644 --- a/core/string/ustring.cpp +++ b/core/string/ustring.cpp @@ -952,10 +952,6 @@ const char32_t *String::get_data() const { return size() ? &operator[](0) : &zero; } -void String::erase(int p_pos, int p_chars) { - *this = left(MAX(p_pos, 0)) + substr(p_pos + p_chars, length() - ((p_pos + p_chars))); -} - String String::capitalize() const { String aux = this->camelcase_to_underscore(true).replace("_", " ").strip_edges(); String cap; @@ -4420,7 +4416,7 @@ String String::property_name_encode() const { // as well as '"', '=' or ' ' (32) const char32_t *cstr = get_data(); for (int i = 0; cstr[i]; i++) { - if (cstr[i] == '=' || cstr[i] == '"' || cstr[i] < 33 || cstr[i] > 126) { + if (cstr[i] == '=' || cstr[i] == '"' || cstr[i] == ';' || cstr[i] == '[' || cstr[i] == ']' || cstr[i] < 33 || cstr[i] > 126) { return "\"" + c_escape_multiline() + "\""; } } |