tree: e8e73502b1c82ded684c7ec25600c20898af9e6d [path history] [tgz]
  1. src/
  2. .android-checksum.json
  3. .cargo-checksum.json
  4. Android.bp
  5. Cargo.toml
  6. cargo_embargo.json
  7. CHANGELOG.md
  8. LICENSE
  9. METADATA
  10. MODULE_LICENSE_APACHE2
  11. README.md
  12. TEST_MAPPING
crates/ident_case/README.md

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"));