Module plural

Source
Expand description

Utilities for pluralizing various words based on count or plurality.

Functions§

binaries_str
Returns “binary” if count is 1, otherwise “binaries”.
directories_str
Returns “directory” if count is 1, otherwise “directories”.
files_str
Returns “file” if count is 1, otherwise “files”.
filters_str
Returns “filter” if count is 1, otherwise “filters”.
libraries_str
Returns “library” if count is 1, otherwise “libraries”.
paths_str
Returns “path” if count is 1, otherwise “paths”.
sections_str
Returns “section” if count is 1, otherwise “sections”.
setup_scripts_str
Returns “setup script” if count is 1, otherwise “setup scripts”.
tests_plural_if
Returns “tests” if plural is true, otherwise “test”.
tests_str
Returns “test” if count is 1, otherwise “tests”.
this_crate_str
Returns “this crate” if count is 1, otherwise “these crates”.
were_plural_if
Returns “were” if plural is true, otherwise “was”.