pub const fn starts_with(left: &str, right: &str) -> bool
Expand description

A const equivalent of str::starts_with , taking a &str parameter.

Example

use konst::string;

assert!( string::starts_with("foo,bar,baz", "foo,"));

assert!(!string::starts_with("foo,bar,baz", "bar"));
assert!(!string::starts_with("foo,bar,baz", "baz"));