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

This commit is contained in:
A Thousand Ships 2024-05-28 12:55:07 +02:00
parent cae3d722a3
commit 331a43a9d8
No known key found for this signature in database
GPG key ID: DEFC5A5B1306947D
35 changed files with 221 additions and 54 deletions

View file

@ -1632,7 +1632,7 @@ Error DocTools::save_classes(const String &p_default_path, const HashMap<String,
}
Error err;
String save_file = save_path.path_join(c.name.replace("\"", "").replace("/", "--") + ".xml");
String save_file = save_path.path_join(c.name.remove_char('\"').replace("/", "--") + ".xml");
Ref<FileAccess> f = FileAccess::open(save_file, FileAccess::WRITE, &err);
ERR_CONTINUE_MSG(err != OK, "Can't write doc file: " + save_file + ".");