1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

LibUnicode: Extract canonicalization of Unicode extension values

LibJS will need to canonicalize Unicode extension values, so extract the
lambda that was doing this work to its own function. This also changes
the helpers it invokes to take the provided key as a StringView because
we don't need (and won't always have) full String objects here.
This commit is contained in:
Timothy Flynn 2021-09-08 21:56:52 -04:00 committed by Linus Groh
parent b1d4bcf364
commit 3ae4ff109f
2 changed files with 39 additions and 33 deletions

View file

@ -127,6 +127,8 @@ bool is_type_identifier(StringView);
Optional<LanguageID> parse_unicode_language_id(StringView);
Optional<LocaleID> parse_unicode_locale_id(StringView);
void canonicalize_unicode_extension_values(StringView key, String& value, bool remove_true);
Optional<String> canonicalize_unicode_locale_id(LocaleID&);
String const& default_locale();