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

@ -67,7 +67,7 @@ Error FileAccessUnixPipe::open_internal(const String &p_path, int p_mode_flags)
path_src = p_path;
ERR_FAIL_COND_V_MSG(fd[0] >= 0 || fd[1] >= 0, ERR_ALREADY_IN_USE, "Pipe is already in use.");
path = String("/tmp/") + p_path.replace("pipe://", "").replace("/", "_");
path = String("/tmp/") + p_path.replace("pipe://", "").replace_char('/', '_');
const CharString path_utf8 = path.utf8();
struct stat st = {};