Module plural

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”.
errors_str
Returns “error” if count is 1, otherwise “errors”.
exist_str
Returns “exists” if count is 1, otherwise “exist”.
files_str
Returns “file” if count is 1, otherwise “files”.
filters_str
Returns “filter” if count is 1, otherwise “filters”.
iterations_str
Returns “iteration” if count is 1, otherwise “iterations”.
libraries_str
Returns “library” if count is 1, otherwise “libraries”.
orphans_str
Returns “orphan” if count is 1, otherwise “orphans”.
paths_str
Returns “path” if count is 1, otherwise “paths”.
remains_str
Returns “remains” if count is 1, otherwise “remain”.
runs_str
Returns “run” if count is 1, otherwise “runs”.
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
Returns “tests” or “benchmarks” based on the run mode.
tests_plural_if
Returns:
tests_str
Returns:
this_crate_str
Returns “this crate” if count is 1, otherwise “these crates”.
were_plural_if
Returns “were” if plural is true, otherwise “was”.