Handbook
Glossary
last-word ( str -- i )
Word and grapheme breaks
Prev:
first-word-from ( start str -- i )
Next:
last-word-from ( end str -- i )
Vocabulary
unicode
Inputs
str
a
string
Outputs
i
index
Word description
Finds the index of the beginning of the last word in the string.
Definition
USING:
kernel
sequences
;
IN:
unicode
:
last-word
( str -- i )
[
length
<iota>
]
keep
[
word-break-at?
]
curry
find-last
drop
0
or
;