Skip to main content

clip_bare

Function clip_bare 

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

The same, without an ellipsis when it does have to cut.

For a title, where a trailing “…” reads as broken rather than as shortened. Two issues were filed on a real repository with titles ending in a literal ellipsis, which is how this was found.