2 stable releases

Uses old Rust 2015

1.0.1 Mar 18, 2019
1.0.0 May 10, 2017

#197 in Text processing

Download history 833657/week @ 2024-02-26 873371/week @ 2024-03-04 882670/week @ 2024-03-11 885489/week @ 2024-03-18 866816/week @ 2024-03-25 922666/week @ 2024-04-01 919329/week @ 2024-04-08 961864/week @ 2024-04-15 983299/week @ 2024-04-22 932082/week @ 2024-04-29 938394/week @ 2024-05-06 1006898/week @ 2024-05-13 991870/week @ 2024-05-20 971789/week @ 2024-05-27 1071547/week @ 2024-06-03 1016656/week @ 2024-06-10

4,094,880 downloads per month
Used in 7,223 crates (13 directly)

MIT/Apache

9KB
122 lines

Build Status

Crate for manipulating case of identifiers in Rust programs.

Features

  • Supports snake_case, lowercase, camelCase, PascalCase, SCREAMING_SNAKE_CASE, and kebab-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, and kebab-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"));

No runtime deps