MCPcopy Create free account
hub / github.com/csskit/csskit / pluralize

Function pluralize

crates/csskit_proc_macro/src/generate.rs:10–12  ·  view source on GitHub ↗
(str: String)

Source from the content-addressed store, hash-verified

8use syn::{Error, Generics, Ident, Visibility, parse_quote};
9
10pub fn pluralize(str: String) -> String {
11 if str.ends_with("s") { str.clone() } else { format!("{str}s") }
12}
13
14pub fn keyword_to_pascal(s: &str) -> String {
15 let pascal = s.to_lowercase().to_pascal_case();

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.80

Tested by

no test coverage detected