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

@ -112,7 +112,7 @@ TEST_CASE("[ProjectSettings] localize_path") {
TestProjectSettingsInternalsAccessor::resource_path() = DirAccess::create(DirAccess::ACCESS_FILESYSTEM)->get_current_dir();
String root_path = ProjectSettings::get_singleton()->get_resource_path();
#ifdef WINDOWS_ENABLED
String root_path_win = ProjectSettings::get_singleton()->get_resource_path().replace("/", "\\");
String root_path_win = ProjectSettings::get_singleton()->get_resource_path().replace_char('/', '\\');
#endif
CHECK_EQ(ProjectSettings::get_singleton()->localize_path("filename"), "res://filename");