pub fn truncate_output(text: &str, max_bytes: u64) -> (String, bool)
Truncate UTF-8 text on a char boundary; returns (text, truncated).