pub fn truncate_str(s: &str, limit: usize) -> String
Truncate a string to the given byte limit, appending info if truncated.