Function safe_truncate_utf8

Source
pub fn safe_truncate_utf8(s: impl AsRef<str>, max_chars: usize) -> String
Expand description

Safely truncates a string to a maximum number of characters.

Respects utf8 character boundaries.