pub const fn bytes_trim_matches<'a>(this: &'a [u8], needle: &[u8]) -> &'a [u8]Expand description
Removes all instances of needle from the start and end of this.
ยงExample
use konst::slice;
const TRIMMED: &[u8] = slice::bytes_trim_matches(b"<>baz qux<><><>", b"<>");
assert_eq!(TRIMMED, b"baz qux");