mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
AK: Use an enum instead of a bool for String::replace(all_occurences)
This commit has no behavior changes. In particular, this does not fix any of the wrong uses of the previous default parameter (which used to be 'false', meaning "only replace the first occurence in the string"). It simply replaces the default uses by String::replace(..., ReplaceMode::FirstOnly), leaving them incorrect.
This commit is contained in:
@@ -246,7 +246,7 @@ static Optional<String> format_time_zone_offset(StringView locale, CalendarPatte
|
||||
|
||||
// The digits used for hours, minutes and seconds fields in this format are the locale's default decimal digits.
|
||||
auto result = replace_digits_for_number_system(*number_system, builder.build());
|
||||
return formats->gmt_format.replace("{0}"sv, result);
|
||||
return formats->gmt_format.replace("{0}"sv, result, ReplaceMode::FirstOnly);
|
||||
}
|
||||
|
||||
// https://unicode.org/reports/tr35/tr35-dates.html#Time_Zone_Format_Terminology
|
||||
|
||||
Reference in New Issue
Block a user