Function cruet::case::kebab::is_kebab_case

source ·
pub fn is_kebab_case(test_string: &str) -> bool
Expand description

Determines if a &str is kebab-case

use cruet::case::is_kebab_case;
 
assert!(is_kebab_case("foo-bar-string-that-is-really-really-long"));
assert!(!is_kebab_case("FooBarIsAReallyReallyLongString"));
assert!(!is_kebab_case("fooBarIsAReallyReallyLongString"));
assert!(!is_kebab_case("FOO_BAR_STRING_THAT_IS_REALLY_REALLY_LONG"));
assert!(!is_kebab_case("foo_bar_string_that_is_really_really_long"));
assert!(!is_kebab_case("Foo bar string that is really really long"));
assert!(!is_kebab_case("Foo Bar Is A Really Really Long String"));