Skip to main content

Module text

Module text 

Source
Expand description

Shared UTF-8-safe, byte-budgeted text truncation (T2).

BoundedText is the one workspace-wide utility for producing byte-bounded, valid-UTF-8 previews of arbitrary (user- or model-derived) strings. Production code must never byte-index-slice such strings directly; route through this type or crate::truncate_str (the borrowing primitive this type is built on).

Structs§

BoundedText
A byte-bounded, char-boundary-safe view of a string, with exact accounting of what was kept and what was cut.