Truncate to at most `max_chars` characters on a char boundary.
(s: &str, max_chars: usize)
| 764 | |
| 765 | /// Truncate to at most `max_chars` characters on a char boundary. |
| 766 | fn truncate_chars(s: &str, max_chars: usize) -> String { |
| 767 | s.chars().take(max_chars).collect() |
| 768 | } |
| 769 | |
| 770 | // Rendering |
| 771 |
no outgoing calls
no test coverage detected