Skip to main content

pluralize

Function pluralize 

Source
pub fn pluralize(word: &str) -> String
Expand description

A deliberately simple heuristic (not a full English pluralization engine) covering the common cases: post -> posts, category -> categories, box -> boxes. Good enough for a default table name; nothing stops a developer from editing #[table("...")] by hand for words this doesn’t handle correctly.