Skip to main content

numbered_window

Function numbered_window 

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

A window of numbered lines, cat -n style, starting at 1-based offset and at most limit lines long. Returns the text and whether more lines follow the window.