2 stable releases
Uses old Rust 2015
1.0.1 | Mar 18, 2019 |
---|---|
1.0.0 | May 10, 2017 |
#24 in #identifier
6,878,164 downloads per month
Used in 8,444 crates
(16 directly)
9KB
122 lines
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"));
lib.rs
:
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"));