Skip to main content

truncate_text

Function truncate_text 

Source
pub fn truncate_text(value: &str, max_bytes: usize) -> (String, bool)
Expand description

Cuts value to at most max_bytes on a character boundary. The returned flag says whether a cut happened; a caller that cuts is responsible for reporting it.