Function konst::slice::bytes_rcontain
source · pub const fn bytes_rcontain<const N: usize, P>(left: &[u8], pattern: &P) -> boolwhere
P: ?Sized + BytesPattern<N>,
Expand description
Returns whether pattern
is contained inside left
, searching in reverse.
§Example
use konst::slice::bytes_rcontain;
assert!(bytes_rcontain(b"foo-bar", b"foo"));
assert!(bytes_rcontain(b"bar-foo", "foo"));
assert!(!bytes_rcontain(b"foo-bar-baz", &'q'));