pub fn french_number_options<N: Integer + FromPrimitive + ToPrimitive + Display + CheckedMul>(
    n: &N,
    options: &Options
) -> String
Expand description

Compute the French language representation of the given number with the given formatting options.

If the number is too large (greater than 10^103), then its numerical representation is returned with a leading minus sign if needed.

Also, the smallest number of a bounded signed numerical type will be returned as a numerical representation because the opposite value cannot be computed. For example, -128u8 will be shown as -128.

Example

use french_numbers::*;

assert_eq!(french_number_options(&37251061, &POST_REFORM_MASCULINE),
           "trente-sept-millions-deux-cent-cinquante-et-un-mille-soixante-et-un");
assert_eq!(french_number_options(&37251061, &POST_REFORM_FEMININE),
           "trente-sept-millions-deux-cent-cinquante-et-un-mille-soixante-et-une");
assert_eq!(french_number_options(&37251061, &PRE_REFORM_FEMININE),
           "trente-sept millions deux cent cinquante et un mille soixante et une");
assert_eq!(french_number_options(&37251061, &PRE_REFORM_MASCULINE),
           "trente-sept millions deux cent cinquante et un mille soixante et un")