Skip to main content

line_text

Function line_text 

Source
pub fn line_text<'s>(
    source: &'s str,
    starts: &[usize],
    line: usize,
) -> Option<&'s str>
Expand description

The text of 1-based line, exactly as str::lines would yield it: without its line ending, with a carriage return stripped only where a line feed follows it, and with no empty line after a final line feed.