Function french_numbers::french_number_options[][src]

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

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.

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")