(line: &str, start_col: usize, end_col_exclusive: usize)
| 151 | } |
| 152 | |
| 153 | fn slice_by_columns(line: &str, start_col: usize, end_col_exclusive: usize) -> String { |
| 154 | if start_col >= end_col_exclusive { |
| 155 | return String::new(); |
| 156 | } |
| 157 | let start = byte_index_for_column_start(line, start_col); |
| 158 | let end = byte_index_for_column_end(line, end_col_exclusive); |
| 159 | if start >= end || start >= line.len() { |
| 160 | return String::new(); |
| 161 | } |
| 162 | line[start..end].to_string() |
| 163 | } |
| 164 | |
| 165 | fn slice_from_column(line: &str, start_col: usize) -> String { |
| 166 | let start = byte_index_for_column_start(line, start_col); |
no test coverage detected