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