Function konst::string::starts_with
source · pub const fn starts_with<'a, P>(left: &str, pat: P) -> boolwhere
P: Pattern<'a>,
Expand description
A const equivalent of
str::starts_with
, taking a Pattern
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"));