Skip to main content

truncate_content

Function truncate_content 

Source
pub fn truncate_content(s: &str, max: usize) -> String
Expand description

Truncate a string to max bytes, appending “…” if truncated. Handles multi-byte UTF-8 safely by finding the nearest char boundary.