Text_Buffer module

previous_word

procedureextensionexperimentalsince 0.31.0Source

The offset where the word left of index starts.

Example↗
assert(previous_word("hello world", 11) == 6);
assert(previous_word("hello world", 6) == 0);
previous_word :: (text: string, index: int) -> int

Parameters

text: string
index: int

Returns

int

See also