Skip to main content

snake

Macro snake 

Source
macro_rules! snake {
    ($ident:expr => ident) => { ... };
    ($s:expr) => { ... };
}
Expand description

Converts a string or ident to snake_case.

  • snake!("HelloWorld")"hello_world" (String)
  • snake!(ident => ident) → snake_case syn::Ident