pub(crate) fn truncate_by_lines(
    buf: String,
    max_lines: usize,
    max_line_len: usize
) -> (String, bool)
Expand description

Shortens a string to a specified line count and adds “[…]” to the end of the shortened string.

returns tuple with the String and a boolean whether is was truncated