french-pluralize

Crates.iofrench-pluralize
lib.rsfrench-pluralize
version0.2.5
sourcesrc
created_at2020-10-28 14:05:36.627902
updated_at2021-01-17 22:23:10.440021
descriptionHelps to get plurals of French words in different ways.
homepage
repositoryhttps://github.com/ltruchot/rust_french-packages
max_upload_size
id306351
size10,662
Loïc TRUCHOT (ltruchot)

documentation

README

french-pluralize

A Rust library to help users to get plurals of French words in different ways.

It mainly follow the french plural rules available on the French Wiktionary

[dependencies]
french-pluralize = "0.2.5"
use french_pluralize::pluralize_word;

println!("{}", pluralize_word("voiture")); // voitures

assert_eq!(pluralize_word("test"), "tests");
assert_eq!(pluralize_word("dos"), "dos");
assert_eq!(pluralize_word("oeil"), "yeux");
assert_eq!(pluralize_word("houx"), "houx");
assert_eq!(pluralize_word("nez"), "nez");
assert_eq!(pluralize_word("bleu"), "bleus");
assert_eq!(pluralize_word("vieu"), "vieux");
assert_eq!(pluralize_word("vœu"), "vœux");
assert_eq!(pluralize_word("bateau"), "bateaux");
assert_eq!(pluralize_word("landau"), "landaus");
assert_eq!(pluralize_word("bijou"), "bijoux");
assert_eq!(pluralize_word("matou"), "matous");
assert_eq!(pluralize_word("animal"), "animaux");
assert_eq!(pluralize_word("festival"), "festivals");
assert_eq!(pluralize_word("corail"), "coraux");
assert_eq!(pluralize_word("émail"), "émaux");
assert_eq!(pluralize_word("chandail"), "chandails");
assert_eq!(pluralize_word("voiture"), "voitures");
assert_eq!(pluralize_word("vélo"), "vélos");
Commit count: 0

cargo fmt