(&self, char_pos: usize)
| 299 | } |
| 300 | |
| 301 | pub fn char_pos_to_byte_pos(&self, char_pos: usize) -> usize { |
| 302 | self.input |
| 303 | .char_indices() |
| 304 | .nth(char_pos) |
| 305 | .map(|(pos, _)| pos) |
| 306 | .unwrap_or(self.input.len()) |
| 307 | } |
| 308 | |
| 309 | // ── Rendering ── |
| 310 |
no test coverage detected