Expand description
Fetch locale-specific number formatting settings.
This module provides basic formatting rules for most rational numbers; floating point numbers in scientific notation, fractional numbers, and imaginary numbers are not covered.
§Example
use locale_settings::locale::{Category, get_locale};
use locale_settings::numeric::get_numeric_format;
use locale_types::Locale;
if get_locale(&Category::Currency).unwrap() == Locale::POSIX {
let format = get_numeric_format();
assert_eq!(format.decimal_separator, ".");
} else {
panic!("expecting POSIX locale");
}Structs§
- Numeric
Format - Numeric formatting settings.
Functions§
- get_
numeric_ format - Fetch the numeric formatting settings for the current locale.
- get_
numeric_ format_ for_ locale - Fetch the numeric formatting rules for a specified
Locale.