1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-02 23:22:07 +00:00

LibUnicode: Begin parsing and generating locale number systems

The number system data in the CLDR contains information on how to format
numbers in a locale-dependent manner. Start parsing this data, beginning
with numeric symbol strings. For example the symbol NaN maps to "NaN" in
the en-US locale, and "非數值" in the zh-Hant locale.
This commit is contained in:
Timothy Flynn 2021-10-24 13:58:33 -04:00 committed by Linus Groh
parent d3e83c9934
commit 12b468a588
3 changed files with 129 additions and 0 deletions

View file

@ -803,6 +803,15 @@ Vector<StringView> get_locale_key_mapping([[maybe_unused]] StringView locale, [[
return {};
}
Optional<StringView> get_number_system_symbol([[maybe_unused]] StringView locale, [[maybe_unused]] StringView system, [[maybe_unused]] StringView symbol)
{
#if ENABLE_UNICODE_DATA
return Detail::get_number_system_symbol(locale, system, symbol);
#else
return {};
#endif
}
Optional<ListPatterns> get_locale_list_patterns([[maybe_unused]] StringView locale, [[maybe_unused]] StringView type, [[maybe_unused]] StringView style)
{
#if ENABLE_UNICODE_DATA