num-format
num-format copied to clipboard
Support both - and _ as locale separators
Currently, Locale::from_str
only supports dash-delimited locales like de-DE
. However, often times locales are represented with an underscore like de_DE
. This PR adds support for allowing both variations to be passed to Locale::from_str
.
It also updates to CLDR 39.0.0 by using the json files from https://github.com/unicode-org/cldr-json/tree/39205fdc027c935e52a268afcf01cd240f3c442d/cldr-json/cldr-numbers-full/main.
All of the diff in the num-format/
directory was autogenerated by running ./scripts/locale.sh
(except for removing #![deny(deprecated)]
from num-format/src/lib.rs
as the deprecated mem::uninitialized
is used).