Return the 0-based index of the word break following p most immediately. p defaults to self.pos; word boundaries are determined using self.syntax_table.
(self, p: int | None = None)
| 426 | return p + 1 |
| 427 | |
| 428 | def eow(self, p: int | None = None) -> int: |
| 429 | """Return the 0-based index of the word break following p most |
| 430 | immediately. |
| 431 | |
| 432 | p defaults to self.pos; word boundaries are determined using |
| 433 | self.syntax_table.""" |
| 434 | if p is None: |
| 435 | p = self.pos |
| 436 | st = self.syntax_table |
| 437 | b = self.buffer |
| 438 | while p < len(b) and st.get(b[p], SYNTAX_WORD) != SYNTAX_WORD: |
| 439 | p += 1 |
| 440 | while p < len(b) and st.get(b[p], SYNTAX_WORD) == SYNTAX_WORD: |
| 441 | p += 1 |
| 442 | return p |
| 443 | |
| 444 | def bol(self, p: int | None = None) -> int: |
| 445 | """Return the 0-based index of the line break preceding p most |