Crate cruet

source ·
Expand description

Adds String based inflections for Rust. Snake, kebab, train, camel, sentence, class, and title cases as well as ordinalize, deordinalize, demodulize, deconstantize, and foreign key are supported as both traits and pure functions acting on String types.

use cruet::Inflector;
let camel_case_string: String = "some_string".to_camel_case();
let is_camel_cased: bool= camel_case_string.is_camel_case();
assert!(is_camel_cased == true);

Re-exports

Modules

  • Provides case inflections
  • Provides number inflections
  • Provides string inflections
  • Provides suffix inflections

Traits