pub fn is_snake_case(test_string: &str) -> boolExpand description
Determines if a &str is snake_case bool
Unlike cruet::case::is_snake_case, this function allows for
numbers to be included in the string without separating them.
use mago_casing::is_snake_case;
assert!(is_snake_case("foo_2_bar"));
assert!(is_snake_case("foo2bar"));
assert!(is_snake_case("foo_bar"));
assert!(is_snake_case("http_foo_bar"));
assert!(is_snake_case("http_foo_bar"));
assert!(is_snake_case("foo_bar"));
assert!(is_snake_case("foo"));
assert!(!is_snake_case("FooBar"));
assert!(!is_snake_case("FooBarIsAReallyReallyLongString"));
assert!(!is_snake_case("FooBarIsAReallyReallyLongStrings"));
assert!(!is_snake_case("foo-bar-string-that-is-really-really-long"));