Truncate to at most `max_chars` characters on a char boundary.
(s: &str, max_chars: usize)
| 784 | |
| 785 | /// Truncate to at most `max_chars` characters on a char boundary. |
| 786 | fn truncate_chars(s: &str, max_chars: usize) -> String { |
| 787 | s.chars().take(max_chars).collect() |
| 788 | } |
| 789 | |
| 790 | // Rendering |
| 791 |
no test coverage detected