Function endinero::endinero_f32
source · pub fn endinero_f32(
amount: f32,
max_decimal_places: u16,
zero_comma_decimal_places: u16,
thousands_separator: char,
radix_character: char,
decimals_separator: char
) -> String
Expand description
Customize the separator characters and decimal precision used to format the output of the given f32
number
Parameters:
amount: f64: the original amount
in f32
max_decimal_places: u16: number of decimal digits to keep for amounts > 0
zero_comma_decimal_places: u16: number of decimal digits to keep for amount < 1
thousands_separator: char: character to be used to separate thousands on the integer part of amount
radix_character: char: character that separates the integer portion from the decimal portion (e.g. .
for numbers in US locale but ,
for numbers in Spanish locales)
decimal_separator: char: character that separates decimal portions every thousandth