Truncate to at most `max_chars` characters on a char boundary.
(value: &str, max_chars: usize)
| 328 | |
| 329 | /// Truncate to at most `max_chars` characters on a char boundary. |
| 330 | fn truncate_chars(value: &str, max_chars: usize) -> String { |
| 331 | value.chars().take(max_chars).collect() |
| 332 | } |
| 333 | |
| 334 | /// One-line preview of a body (first 160 chars, newlines collapsed). |
| 335 | fn preview(body: &str) -> String { |
no test coverage detected