Add String::replace_char(s) methods for performance and convenience

This commit is contained in:
A Thousand Ships 2024-05-28 12:15:00 +02:00
parent c374ce211c
commit 889410dcda
No known key found for this signature in database
GPG key ID: DEFC5A5B1306947D
67 changed files with 297 additions and 137 deletions

View file

@ -362,7 +362,7 @@ Ref<Script> CSharpLanguage::make_template(const String &p_template, const String
Ref<CSharpScript> scr;
scr.instantiate();
String class_name_no_spaces = p_class_name.replace(" ", "_");
String class_name_no_spaces = p_class_name.replace_char(' ', '_');
String base_class_name = get_base_class_name(p_base_class_name, class_name_no_spaces);
String processed_template = p_template;
processed_template = processed_template.replace("_BINDINGS_NAMESPACE_", BINDINGS_NAMESPACE)