mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 23:30:20 +00:00
LibUnicode: Parse number system digits from the CLDR
We had a hard-coded table of number system digits copied from ECMA-402. Turns out these digits are in the CLDR, so let's parse the digits from there instead of hard-coding them.
This commit is contained in:
parent
05ed8d1738
commit
c5138f0f2b
Notes:
sideshowbarker
2024-07-17 21:08:46 +09:00
Author: https://github.com/trflynn89
Commit: c5138f0f2b
Pull-request: https://github.com/SerenityOS/serenity/pull/11820
5 changed files with 112 additions and 86 deletions
|
@ -65,10 +65,13 @@ enum class NumericSymbol : u8 {
|
|||
PlusSign,
|
||||
};
|
||||
|
||||
Optional<NumberSystem> number_system_from_string(StringView system);
|
||||
Optional<StringView> get_default_number_system(StringView locale);
|
||||
|
||||
Optional<StringView> get_number_system_symbol(StringView locale, StringView system, NumericSymbol symbol);
|
||||
Optional<NumberGroupings> get_number_system_groupings(StringView locale, StringView system);
|
||||
|
||||
Optional<Span<u32 const>> get_digits_for_number_system(StringView system);
|
||||
String replace_digits_for_number_system(StringView system, StringView number);
|
||||
|
||||
Optional<NumberFormat> get_standard_number_system_format(StringView locale, StringView system, StandardNumberFormatType type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue