to_snake

Function to_snake 

Source
pub fn to_snake(string: &str) -> String
Expand description

Return a version of the string in snake_case format.

§Arguments

  • string - The string to get a snake_case version of.

§Examples

let result = case_switcher::to_snake("sampleString");
assert_eq!(result, "sample_string");