Add String::remove_char(s) methods for performance and convenience

This commit is contained in:
A Thousand Ships 2024-05-28 12:55:07 +02:00
parent cae3d722a3
commit 331a43a9d8
No known key found for this signature in database
GPG key ID: DEFC5A5B1306947D
35 changed files with 221 additions and 54 deletions

View file

@ -214,7 +214,7 @@ String OS::get_locale() const {
// Non-virtual helper to extract the 2 or 3-letter language code from
// `get_locale()` in a way that's consistent for all platforms.
String OS::get_locale_language() const {
return get_locale().left(3).replace("_", "");
return get_locale().left(3).remove_char('_');
}
// Embedded PCK offset.