bubbly-bub-test 0.3.1

Interactive mode extension crate to Command Line Arguments Parser (https://crates.io/crates/clap) (derive macros helper crate)
Documentation
1
2
3
4
5
6
7
8
9
10
pub fn to_kebab_case(s: String) -> String {
    let mut snake = String::new();
    for (i, ch) in s.char_indices() {
        if i > 0 && ch.is_uppercase() {
            snake.push('-');
        }
        snake.push(ch.to_ascii_lowercase());
    }
    snake.as_str().replace('_', "-")
}