mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:17:45 +00:00
LibJS: Implement ECMA-402 String.prototype.toLocale{Lower,Upper}Case
This commit is contained in:
parent
14086c69e7
commit
207319ecf1
5 changed files with 91 additions and 7 deletions
|
@ -233,7 +233,7 @@ Vector<String> canonicalize_locale_list(GlobalObject& global_object, Value local
|
|||
}
|
||||
|
||||
// 9.2.2 BestAvailableLocale ( availableLocales, locale ), https://tc39.es/ecma402/#sec-bestavailablelocale
|
||||
static Optional<String> best_available_locale(StringView const& locale)
|
||||
Optional<String> best_available_locale(StringView const& locale)
|
||||
{
|
||||
// 1. Let candidate be locale.
|
||||
StringView candidate = locale;
|
||||
|
|
|
@ -29,6 +29,7 @@ struct LocaleResult {
|
|||
Optional<Unicode::LocaleID> is_structurally_valid_language_tag(StringView locale);
|
||||
String canonicalize_unicode_locale_id(Unicode::LocaleID& locale);
|
||||
Vector<String> canonicalize_locale_list(GlobalObject&, Value locales);
|
||||
Optional<String> best_available_locale(StringView const& locale);
|
||||
Vector<String> best_fit_supported_locales(Vector<String> const& requested_locales);
|
||||
Vector<String> lookup_supported_locales(Vector<String> const& requested_locales);
|
||||
Array* supported_locales(GlobalObject&, Vector<String> const& requested_locales, Value options);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue