Merge pull request #92475 from AThousandShips/string_replace_char

Add `String::replace_char(s)` methods for performance and convenience
This commit is contained in:
Thaddeus Crews
2025-04-10 10:18:16 -05:00
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 {