Truncate to at most `max_chars` characters on a char boundary.
(s: &str, max_chars: usize)
| 730 | |
| 731 | /// Truncate to at most `max_chars` characters on a char boundary. |
| 732 | fn truncate_chars(s: &str, max_chars: usize) -> String { |
| 733 | s.chars().take(max_chars).collect() |
| 734 | } |
| 735 | |
| 736 | // Rendering |
| 737 |
no outgoing calls
no test coverage detected