Add String::replace_char(s) methods for performance and convenience
This commit is contained in:
@ -135,7 +135,7 @@ TranslationServer::Locale::operator String() const {
|
||||
|
||||
TranslationServer::Locale::Locale(const TranslationServer &p_server, const String &p_locale, bool p_add_defaults) {
|
||||
// Replaces '-' with '_' for macOS style locales.
|
||||
String univ_locale = p_locale.replace("-", "_");
|
||||
String univ_locale = p_locale.replace_char('-', '_');
|
||||
|
||||
// Extract locale elements.
|
||||
Vector<String> locale_elements = univ_locale.get_slicec('@', 0).split("_");
|
||||
|
||||
Reference in New Issue
Block a user