The offset where the word right of index ends. Spaces are skipped first, then a run of word
characters or of punctuation. Line breaks are the caller's to handle.
assert(next_word("hello world", 0) == 5);
assert(next_word("hello world", 5) == 11);next_word :: (text: string, index: int) -> int
Parameters
- text: string
- index: int
Returns
- int