Function cruet::case::title::is_title_case

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

Determines if a &str is Title Case

use cruet::case::title::is_title_case;

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