Skip to main content

line_range

Function line_range 

Source
pub fn line_range(source: &str, start: u32, end: u32) -> (u32, u32)
Expand description

1-indexed line range for the byte slice [start, end) in source. end_line is the line of the LAST byte (end - 1); empty / out-of-bounds ranges collapse to a single line at the start position.