2 stable releases
Uses old Rust 2015
| 1.0.1 | Mar 18, 2019 |
|---|---|
| 1.0.0 | May 10, 2017 |
#916 in Text processing
11,841,453 downloads per month
Used in 16,682 crates
(21 directly)
9KB
122 lines
Crate for changing case of Rust identifiers.
Features
- Supports
snake_case,lowercase,camelCase,PascalCase,SCREAMING_SNAKE_CASE, andkebab-case - Rename variants, and fields
Examples
use ident_case::RenameRule;
assert_eq!("helloWorld", RenameRule::CamelCase.apply_to_field("hello_world"));
assert_eq!("i_love_serde", RenameRule::SnakeCase.apply_to_variant("ILoveSerde"));
Crate for manipulating case of identifiers in Rust programs.
Features
- Supports
snake_case,lowercase,camelCase,PascalCase,SCREAMING_SNAKE_CASE, andkebab-case - Rename variants, and fields
Examples
assert_eq!("helloWorld", RenameRule::CamelCase.apply_to_field("hello_world"));
assert_eq!("i_love_serde", RenameRule::SnakeCase.apply_to_variant("ILoveSerde"));