1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:17:35 +00:00

LibJS+LibUnicode: Store parsed Unicode locale data as full strings

Originally, it was convenient to store the parsed Unicode locale data as
views into the original string being parsed. But to implement locale
aliases will require mutating the data that was parsed. To prepare for
that, store the parsed data as proper strings.
This commit is contained in:
Timothy Flynn 2021-08-30 14:31:48 -04:00 committed by Linus Groh
parent caf5b6fa6f
commit d13142f015
4 changed files with 22 additions and 22 deletions

View file

@ -19,7 +19,7 @@ namespace JS::Intl {
// 6.2.2 IsStructurallyValidLanguageTag ( locale ), https://tc39.es/ecma402/#sec-isstructurallyvalidlanguagetag
static Optional<Unicode::LocaleID> is_structurally_valid_language_tag(StringView locale)
{
auto contains_duplicate_variant = [](Vector<StringView>& variants) {
auto contains_duplicate_variant = [](auto& variants) {
if (variants.is_empty())
return false;