last-grapheme-from ( end str -- i ) (original) (raw)
last-grapheme-from ( end str -- i )
Word and grapheme breaks
Prev: | last-grapheme ( str -- i ) |
---|---|
Next: | >graphemes ( str -- graphemes ) |
Vocabulary
unicode
Inputs
end | an index |
---|---|
str | a string |
Outputs
i | an index |
---|
Word description
Finds the index of the start of the last grapheme of the string, starting from the given index. This can be used to traverse the graphemes of a string backwards.
Definition
: last-grapheme-from ( end str -- i )
swap head-slice last-grapheme ;