1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

String: Remove erase method, bindings can't mutate String

This commit is contained in:
Rémi Verschelde
2021-11-11 09:08:08 +01:00
parent 171a69757f
commit 2beaae4b6f
10 changed files with 24 additions and 41 deletions

View File

@@ -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;