pub fn truncate_lines_and_trailoff(s: &str, max_lines: usize) -> StringExpand description
Takes only max_lines from the string and, if there were more than max_lines-1, appends a
a newline and “…” to the string, so that max_lines are returned.
Returns string unchanged if its length is smaller than max_lines.