LibJS+LibUnicode: Port Intl.DisplayNames to UTF-16 strings

This commit is contained in:
Timothy Flynn 2025-07-23 14:31:12 -04:00 committed by Andreas Kling
commit 7d80aabbdb
Notes: github-actions[bot] 2025-07-24 08:41:36 +00:00
7 changed files with 45 additions and 39 deletions

View file

@ -164,7 +164,12 @@ String icu_string_to_string(UChar const* string, i32 length)
Utf16String icu_string_to_utf16_string(icu::UnicodeString const& string)
{
return Utf16String::from_utf16_without_validation({ string.getBuffer(), static_cast<size_t>(string.length()) });
return icu_string_to_utf16_string(string.getBuffer(), string.length());
}
Utf16String icu_string_to_utf16_string(UChar const* string, i32 length)
{
return Utf16String::from_utf16_without_validation({ string, static_cast<size_t>(length) });
}
UCharIterator icu_string_iterator(Utf16View const& string)