2 stable releases

Uses old Rust 2015

1.0.1 Mar 18, 2019
1.0.0 May 10, 2017

#186 in Text processing

Download history 1244296/week @ 2024-09-10 1330134/week @ 2024-09-17 1407442/week @ 2024-09-24 1746869/week @ 2024-10-01 1963427/week @ 2024-10-08 1909243/week @ 2024-10-15 1516905/week @ 2024-10-22 1414446/week @ 2024-10-29 1377036/week @ 2024-11-05 1440879/week @ 2024-11-12 1451813/week @ 2024-11-19 1287274/week @ 2024-11-26 1464686/week @ 2024-12-03 1524745/week @ 2024-12-10 1316364/week @ 2024-12-17 700349/week @ 2024-12-24

5,276,098 downloads per month
Used in 9,280 crates (17 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