Expand description
Byte-slice helpers that complement bytes::Bytes and String.
Message payloads use bytes::Bytes for shared ownership and
String for textual data. This module collects a small handful
of helpers callers reach for: a length-prefixed byte-ordering
comparison and char-finding wrappers that operate on slices.
Functionsยง
- eq_
ignore_ ascii_ case - Case-insensitive ASCII slice equality. Slices of different lengths are unequal.
- strchr
- Return the byte index of the first occurrence of
needleinhaystack, orNoneif absent. - string_
compare - Compare two byte slices: shorter slices sort first, otherwise sort lexicographically.
- strrchr
- Return the byte index of the last occurrence of
needleinhaystack, orNoneif absent.