diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-11-11 13:00:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-11 13:00:21 +0100 |
commit | 1aa3c8419b2405d81d04f4fb3ac142fcd355de85 (patch) | |
tree | cb9c9b08941468bc4f7a6aa50e0464ce70b1c03f /core | |
parent | 51c8e4429b85b4c39302b8cc9e5a97137b0ad430 (diff) | |
parent | 2beaae4b6f1c4a2c3833a5e205157fd3be2fcabc (diff) |
Merge pull request #54869 from akien-mga/string-remove-erase
Diffstat (limited to 'core')
-rw-r--r-- | core/io/http_client.cpp | 3 | ||||
-rw-r--r-- | core/string/ustring.cpp | 4 | ||||
-rw-r--r-- | core/variant/variant_call.cpp | 2 |
3 files changed, 1 insertions, 8 deletions
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp index 5c1352c1b6..800ac779e5 100644 --- a/core/io/http_client.cpp +++ b/core/io/http_client.cpp @@ -85,8 +85,7 @@ String HTTPClient::query_string_from_dict(const Dictionary &p_dict) { } } } - query.erase(0, 1); - return query; + return query.substr(1); } Dictionary HTTPClient::_get_response_headers_as_dictionary() { diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index 25c21486d6..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; diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index 3a68497a69..65ea969146 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -1412,8 +1412,6 @@ static void _register_variant_builtin_methods() { bind_method(String, plus_file, sarray("file"), varray()); bind_method(String, unicode_at, sarray("at"), varray()); bind_method(String, dedent, sarray(), varray()); - // FIXME: String needs to be immutable when binding - //bind_method(String, erase, sarray("position", "chars"), varray()); bind_method(String, hash, sarray(), varray()); bind_method(String, md5_text, sarray(), varray()); bind_method(String, sha1_text, sarray(), varray()); |