Skip to main content

one_line_excerpt

Function one_line_excerpt 

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

One flattened line of a message’s text, for a card that quotes it: the whitespace collapses, and a line past limit characters stops at the last space before the bound where there is one, marked with an ellipsis.