#string-literal #ident #string #case #macro #casing

macro identconv

Convenient macros that turn idents or string literals into another ident or string literal by case converting

4 releases

0.2.0 Sep 26, 2023
0.1.3 Sep 26, 2023
0.1.2 Sep 26, 2023
0.1.1 Sep 18, 2023
0.1.0 Sep 18, 2023

#9 in #casing

22 downloads per month
Used in strflags

MIT/Apache

10KB
115 lines

identconv

Convenient macros that turn Idents or ident like string literals into Idents or Strings by case converting.

Macros

Macro To Case Output
lower!() flatlowercase Ident
upper!() FLATUPPERCASE Ident
snake!() snake_case Ident
usnake!() UPPER_SNAKE_CASE Ident
camel!() camelCase Ident
pascal!() PascalCase Ident
lower_strify!() flatlowercase &'static str
upper_strify!() FLATUPPERCASE &'static str
snake_strify!() snake_case &'static str
usnake_strify!() UPPER_SNAKE_CASE &'static str
camel_strify!() camelCase &'static str
pascal_strify!() PascalCase &'static str
kebab_strify!() kebab-case &'static str
ukebab_strify!() UPPER-KEBAB-CASE &'static str
train_strify!() Train-Case &'static str
english_lower!() lower case &'static str
english_upper!() UPPER CASE &'static str
english_title!() Title Case &'static str

Dependencies

~660KB