Function cruet::case::train::is_train_case

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

Determines if a &str is Train-Case

use cruet::case::train::is_train_case;

assert!(is_train_case("Foo-Bar-String-That-Is-Really-Really-Long"));
assert!(!is_train_case("foo-bar-string-that-is-really-really-long"));
assert!(!is_train_case("FooBarIsAReallyReallyLongString"));
assert!(!is_train_case("fooBarIsAReallyReallyLongString"));
assert!(!is_train_case("foo_bar_string_that_is_really_really_long"));
assert!(!is_train_case("Foo bar string that is really really long"));
assert!(!is_train_case("Foo Bar Is A Really Really Long String"));