Return the character at the given position. This panics if the given position does not point to a valid char.
(&self, i: usize)
| 469 | /// |
| 470 | /// This panics if the given position does not point to a valid char. |
| 471 | fn char_at(&self, i: usize) -> char { |
| 472 | self.pattern()[i..].chars().next() |
| 473 | .unwrap_or_else(|| { |
| 474 | panic!("expected char at offset {}", i) |
| 475 | }) |
| 476 | } |
| 477 | |
| 478 | /// Bump the parser to the next Unicode scalar value. |
| 479 | /// |