case_conv_macros 1.0.0

Macros to convert identifiers and string literals to strings in a different case style.
Documentation
  • Coverage
  • 100%
    17 out of 17 items documented1 out of 17 items with examples
  • Size
  • Source code size: 18.25 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 390.83 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 29s Average build duration of successful builds.
  • all releases: 21s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Choosechee/case_conv_macros
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Choosechee
case_conv_macros-1.0.0 has been yanked.

Convert identifiers and string literals to different case styles

Motivation

I wanted a macro to convert identifiers to camel case string literals for use in a project, but I only found one that converted to pascal case. So, I forked it and added support for all the case styles you could ever want, so no one else has the same problem I had. I also added support for converting string literals, because why not?

Installation

Add it to your project with cargo (COMING SOON):

cargo add case_conv_macros

Example

use case_conv_macros::{identifier_to_camel, literal_to_sentence};

let my_rusty_identifier = identifier_to_camel!(my_rusty_identifier);
assert_eq!(my_rusty_identifier, "myRustyIdentifier");

let my_rusty_literal = literal_to_sentence!("my_rusty_literal");
assert_eq!(my_rusty_literal, "My rusty literal");