Skip to main content

head

Function head 

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

text on one line, at most cap bytes, cut on a char boundary with an ellipsis when longer.