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) — a slice that ends
just past a \n does not yet “touch” the next line. Empty / out-of-bounds
ranges collapse to a single line at the start position. Convention matches
what every IDE shows the user.