LibUnicode: Port Intl.PluralRules to UTF-16 strings

This commit is contained in:
Timothy Flynn 2025-07-23 15:25:14 -04:00 committed by Andreas Kling
commit abcb2d42bc
Notes: github-actions[bot] 2025-07-24 08:41:14 +00:00
5 changed files with 17 additions and 9 deletions

View file

@ -169,6 +169,11 @@ Utf16String icu_string_to_utf16_string(UChar const* string, i32 length)
return Utf16String::from_utf16_without_validation({ string, static_cast<size_t>(length) });
}
Utf16View icu_string_to_utf16_view(icu::UnicodeString const& string)
{
return { string.getBuffer(), static_cast<size_t>(string.length()) };
}
UCharIterator icu_string_iterator(Utf16View const& string)
{
UCharIterator iterator;