This crate transforms a number into its French representation.
In your Cargo.toml
, put:
ini
[dependencies]
french-numbers = "0.1"
You can then use the french_number
function from the french_numbers
crate
to format any integer into the beautiful French romance language:
``` rust use frenchnumbers::frenchnumber;
asserteq!(frenchnumber(&71), "soixante-et-onze"); asserteq!(frenchnumber(&1001), "mille-et-un"); asserteq!(frenchnumber(&-200001), "moins deux-cent-mille-et-un"); asserteq!(frenchnumber(&-200000001), "moins deux-cents-millions-un"); asserteq!(frenchnumber(&-204000001), "moins deux-cent-quatre-millions-un"); ```