MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / format_count

Function format_count

atomic-cli/src/commands/add.rs:693–699  ·  view source on GitHub ↗

Format a count with singular/plural noun.

(count: usize, singular: &str, plural: &str)

Source from the content-addressed store, hash-verified

691
692/// Format a count with singular/plural noun.
693fn format_count(count: usize, singular: &str, plural: &str) -> String {
694 if count == 1 {
695 format!("{} {}", count, singular)
696 } else {
697 format!("{} {}", count, plural)
698 }
699}
700
701// Tests
702

Callers 1

print_resultsMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected