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