mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Add String::replace_char(s) methods for performance and convenience
This commit is contained in:
parent
c374ce211c
commit
889410dcda
67 changed files with 297 additions and 137 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue