2 stable releases

Uses old Rust 2015

1.0.1 Mar 18, 2019
1.0.0 May 10, 2017

#175 in Text processing

Download history 1433288/week @ 2024-11-17 1284457/week @ 2024-11-24 1452354/week @ 2024-12-01 1530768/week @ 2024-12-08 1445311/week @ 2024-12-15 688827/week @ 2024-12-22 874512/week @ 2024-12-29 1551642/week @ 2025-01-05 1705737/week @ 2025-01-12 1579365/week @ 2025-01-19 1723393/week @ 2025-01-26 1872866/week @ 2025-02-02 1976614/week @ 2025-02-09 1827807/week @ 2025-02-16 2023702/week @ 2025-02-23 2244812/week @ 2025-03-02

8,195,023 downloads per month
Used in 10,538 crates (20 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