1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

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
67 changed files with 297 additions and 137 deletions

View File

@@ -1867,7 +1867,7 @@ bool EditorFileSystem::_find_file(const String &p_file, EditorFileSystemDirector
return false;
}
f = f.substr(6);
f = f.replace("\\", "/");
f = f.replace_char('\\', '/');
Vector<String> path = f.split("/");
@@ -1993,7 +1993,7 @@ EditorFileSystemDirectory *EditorFileSystem::get_filesystem_path(const String &p
}
f = f.substr(6);
f = f.replace("\\", "/");
f = f.replace_char('\\', '/');
if (f.is_empty()) {
return filesystem;
}