Skip to main content

truncate_utf8

Function truncate_utf8 

Source
pub fn truncate_utf8(s: &str, max_bytes: usize) -> &str
Expand description

Truncate s to at most max_bytes bytes on a char boundary (never panics, never splits a multi-byte character). Shared by the catalog’s description cap and the mover’s result-wire bound — foreign-writer-controlled strings must never 4xx a CR create or inflate the result ConfigMap.