truncate_and_remove_front

Function truncate_and_remove_front 

Source
pub fn truncate_and_remove_front(s: &str, max_chars: usize) -> String
Expand description

Removes characters from the front of the string if its length is greater than max_chars and prepends the string with “…”. Returns string unchanged if its length is smaller than max_chars.