Skip to main content

truncate_strings

Function truncate_strings 

Source
pub fn truncate_strings(value: &mut Value, max: usize) -> bool
Expand description

Shortens every string longer than max characters, recursively.

Returns true when at least one string was cut, so the caller can flag the envelope. Truncation counts characters, not bytes, and therefore never splits a UTF-8 sequence.