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

@ -431,7 +431,7 @@ Error OS_MacOS::shell_open(const String &p_uri) {
String OS_MacOS::get_locale() const {
NSString *locale_code = [[NSLocale preferredLanguages] objectAtIndex:0];
return String([locale_code UTF8String]).replace("-", "_");
return String([locale_code UTF8String]).replace_char('-', '_');
}
Vector<String> OS_MacOS::get_system_fonts() const {