Function bytes_trim_start_matches

Source
pub const fn bytes_trim_start_matches<'a>(
    this: &'a [u8],
    needle: &[u8],
) -> &'a [u8]
Expand description

Removes all instances of needle from the start of this.

ยงExample

use konst::slice;

const TRIMMED: &[u8] = slice::bytes_trim_start_matches(b"#####huh###", b"##");

assert_eq!(TRIMMED, b"#huh###");