1
Fork 0

Support other types of pluralization in pluralize macro

This commit is contained in:
est31 2022-03-14 17:55:14 +01:00
parent bce19cf7f1
commit 3bf9124f14
8 changed files with 26 additions and 23 deletions

View file

@ -20,6 +20,12 @@ macro_rules! pluralize {
($x:expr) => {
if $x != 1 { "s" } else { "" }
};
("is", $x:expr) => {
if $x == 1 { "is" } else { "are" }
};
("this", $x:expr) => {
if $x == 1 { "this" } else { "these" }
};
}
/// Indicates the confidence in the correctness of a suggestion.