pub fn truncate_context(s: &str, max_len: usize) -> StringExpand description
Truncate a string to approximately max_len characters with " ... " in the middle.
If the string is shorter than or equal to max_len, returns it unchanged.
Uses char_indices() for Unicode safety.