Line number for an exclusive end byte (inclusive end).
(&self, end_byte: usize)
| 67 | |
| 68 | /// Line number for an exclusive end byte (inclusive end). |
| 69 | pub fn inclusive_line_for_end(&self, end_byte: usize) -> usize { |
| 70 | if end_byte == 0 { |
| 71 | 1 |
| 72 | } else { |
| 73 | self.line_for_byte(end_byte.saturating_sub(1)) |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | pub fn line_text(&self, line: usize) -> &str { |
| 78 | if line == 0 { |
no test coverage detected