Skip to main content

to_kebab_case

Function to_kebab_case 

pub fn to_kebab_case(s: &str) -> String
Expand description

Common key transformation: convert to kebab-case.

ยงExamples

use noyalib::with::singleton_map_with::to_kebab_case;

assert_eq!(to_kebab_case("GetRequest"), "get-request");
assert_eq!(to_kebab_case("HTTPServer"), "h-t-t-p-server");