[][src]Module locale_settings::numeric

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

NumericFormat

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.