Crates.io | french-pluralize |
lib.rs | french-pluralize |
version | 0.2.5 |
source | src |
created_at | 2020-10-28 14:05:36.627902 |
updated_at | 2021-01-17 22:23:10.440021 |
description | Helps to get plurals of French words in different ways. |
homepage | |
repository | https://github.com/ltruchot/rust_french-packages |
max_upload_size | |
id | 306351 |
size | 10,662 |
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");