2 stable releases

Uses old Rust 2015

1.0.1 Mar 18, 2019
1.0.0 May 10, 2017

#605 in Text processing

Download history 665157/week @ 2023-10-20 666776/week @ 2023-10-27 684996/week @ 2023-11-03 705975/week @ 2023-11-10 657864/week @ 2023-11-17 639017/week @ 2023-11-24 693839/week @ 2023-12-01 716568/week @ 2023-12-08 652861/week @ 2023-12-15 360197/week @ 2023-12-22 488792/week @ 2023-12-29 680743/week @ 2024-01-05 702429/week @ 2024-01-12 784961/week @ 2024-01-19 752803/week @ 2024-01-26 654171/week @ 2024-02-02

3,022,851 downloads per month
Used in 6,196 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