1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:58:11 +00:00
serenity/Userland/Libraries/LibUnicode
Timothy Flynn 230b133ee3 LibUnicode: Parse number formats into zero/positive/negative patterns
A number formatting pattern in the CLDR contains one or two entries,
delimited by a semi-colon. Previously, LibUnicode was just storing the
entire pattern as one string. This changes the generator to split the
pattern on that delimiter and generate the 3 unique patterns expected by
ECMA-402.

The rules for generating the 3 patterns are as follows:

* If the pattern contains 1 entry, it is the zero pattern. The positive
  pattern is the zero pattern prepended with {plusSign}. The negative
  pattern is the zero pattern prepended with {minusSign}.

* If the pattern contains 2 entries, the first is the zero pattern, and
  the second is the negative pattern. The positive pattern is the zero
  pattern prepended with {plusSign}.
2021-11-12 09:17:08 +00:00
..
CharacterTypes.cpp Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
CharacterTypes.h Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
CMakeLists.txt LibUnicode: Add some data related to currency codes 2021-09-11 11:05:50 +01:00
CurrencyCode.cpp LibUnicode: Add some data related to currency codes 2021-09-11 11:05:50 +01:00
CurrencyCode.h LibUnicode: Add some data related to currency codes 2021-09-11 11:05:50 +01:00
Forward.h LibUnicode: Parse and generate standard percentage formatting rules 2021-11-12 09:17:08 +00:00
Locale.cpp LibUnicode: Parse and generate standard percentage formatting rules 2021-11-12 09:17:08 +00:00
Locale.h LibUnicode: Parse number formats into zero/positive/negative patterns 2021-11-12 09:17:08 +00:00