Function konst::slice::bytes_start_with[][src]

pub const fn bytes_start_with(left: &[u8], right: &[u8]) -> bool
Expand description

A const equivalent of <[u8]>::starts_with

Example

use konst::slice::bytes_start_with;

assert!( bytes_start_with(b"foo,bar,baz", b"foo,"));

assert!(!bytes_start_with(b"foo,bar,baz", b"bar"));
assert!(!bytes_start_with(b"foo,bar,baz", b"baz"));