Skip to main content

truncate_modal_text

Function truncate_modal_text 

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

Truncate modal body text to max_chars characters, appending … only when truncation actually happened so shortened text never reads as complete.