(self, count: int)
| 81 | return self.string[self.position.chars:self.position.chars + count] |
| 82 | |
| 83 | def read(self, count: int) -> str: |
| 84 | result = self.string[self.position.chars:self.position.chars + count] |
| 85 | if len(result) < count: |
| 86 | raise Error("read: End of string") |
| 87 | self.position.advance(result) |
| 88 | return result |
| 89 | |
| 90 | def read_regex(self, regex: Pattern[str]) -> Sequence[str]: |
| 91 | match = regex.match(self.string, self.position.chars) |