Samuel Tardieu @ rfc1149.net

french-numbers

French representation of numbers in Rust

The french-numbers crate for Rust allows the formatting of numbers in the French language in a Rust program.

A command-line utility allows to create those numbers without any programming:

% french-numbers --prefix --feminine 99 102
99 quatre-vingt-dix-neuf
100 cent
101 cent-une
102 cent-deux

% french-numbers 7293742897481
sept-billions-deux-cent-quatre-vingt-treize-milliards-sept-cent-quarante-deux-\
millions-huit-cent-quatre-vingt-dix-sept-mille-quatre-cent-quatre-vingt-un

This post (in French) gives more details.

Using french-numbers

In order to use french-numbers, you can add it to your Cargo.toml as a dependency
[dependencies]
french-numbers = "1.2.0"
The package documentation is available online.

Getting french-numbers

Published version (1.2.0)

You can access the crate from crates.io and the Documentation.

Development version

You can get the current development version of french-numbers using git:
git clone https://github.com/evenfurther/french-numbers.git
This will create a french-numbers directory in which you will be able to record your own changes. You can also browse the french-numbers repository on GitHub.

Contributing to french-numbers

Reporting bugs and asking for features

If you find a bug or have an idea for a new feature, you might consider adding a new issue. The more precise you will be in your description, the more useful it will be.

Submitting patches

Patches are gladly accepted from their original author. Along with any patches, please state that the patch is your original work and that you license the work to the french-numbers project under a license compatible with the current one (Apache 2.0 license / MIT license).

To propose a patch, you may fork the french-numbers repository on GitHub, and issue a pull request. You may also send patches and pull requests by email.