Skip to main content

Module string

Module string 

Source
Expand description

String conversion, formatting, parsing, serialization, and slicing utilities.

The module includes borrowed unquoted views, Serde adapters, chunking, case conversion, deterministic prefix selection, and UTF-8 conversion. Specialized display wrappers avoid allocation. String traits and helpers are re-exported from child modules.

Modulesยง

between ๐Ÿ”’
chunk ๐Ÿ”’
Budget-driven text segmentation. The size budget is injected as a fits predicate, so the caller owns measurement; markdown mode keeps code fences self-contained across segment boundaries.
de
Serde deserializers for normalized strings.
split ๐Ÿ”’
unquote ๐Ÿ”’
unquoted ๐Ÿ”’

Structsยง

Unquoted
A string view with surrounding quotes removed when present.

Constantsยง

EMPTY
Provides a shared empty string slice.

Traitsยง

Between
Slice a string between a pair of delimiters.
SplitInfallible
Split a string with default behaviors on non-match.
Unquote
Slice a string between quotes

Functionsยง

camel_to_snake_case
Streams ASCII camel-case bytes into a writer as lowercase snake case.
camel_to_snake_string
Converts ASCII camel-case text into an owned lowercase snake-case string.
chunk
Lazily splits text using a monotonic fits predicate.
collect_stream
Collects text emitted by a callback into an owned string.
common_prefix
Returns the longest common ASCII prefix of a collection of strings.
format_array_string
Formats arguments into an array string with constant byte capacity.
format_small_string
Formats arguments into a small string with an inline byte capacity.
str_from_bytes
Borrows a byte slice as UTF-8 text.
string_from_bytes
Converts UTF-8 bytes into an owned string.
to_array_string
Displays a value into an array string with constant byte capacity.
to_small_string
Displays a value into a small string with an inline byte capacity.
truncate_deterministic
Returns a deterministic prefix selected from the string contents.
try_format_array_string
Formats arguments into an array string, propagating any formatting error.
try_format_small_string
Formats arguments into a small string, propagating any formatting error.