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)
| 476 | return p + 1 |
| 477 | |
| 478 | def eow(self, p: int | None = None) -> int: |
| 479 | """Return the 0-based index of the word break following p most |
| 480 | immediately. |
| 481 | |
| 482 | p defaults to self.pos; word boundaries are determined using |
| 483 | self.syntax_table.""" |
| 484 | if p is None: |
| 485 | p = self.pos |
| 486 | st = self.syntax_table |
| 487 | b = self.buffer |
| 488 | while p < len(b) and st.get(b[p], SYNTAX_WORD) != SYNTAX_WORD: |
| 489 | p += 1 |
| 490 | while p < len(b) and st.get(b[p], SYNTAX_WORD) == SYNTAX_WORD: |
| 491 | p += 1 |
| 492 | return p |
| 493 | |
| 494 | def bol(self, p: int | None = None) -> int: |
| 495 | """Return the 0-based index of the line break preceding p most |