Skip to main content

Module dyn_string

Module dyn_string 

Source
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 needle in haystack, or None if absent.
string_compare
Compare two byte slices: shorter slices sort first, otherwise sort lexicographically.
strrchr
Return the byte index of the last occurrence of needle in haystack, or None if absent.