Handbook
Glossary
first-word ( str -- i )
Word and grapheme breaks
Prev:
string-reverse ( str -- rts )
Next:
first-word-from ( start str -- i )
Vocabulary
unicode
Inputs
str
a
string
Outputs
i
index
Word description
Finds the index of the end of the first word in the string.
Definition
USING:
kernel
sequences
unicode.breaks.private
;
IN:
unicode
:
first-word
( str -- i )
[
[
length
]
[
first
word-break-prop
]
bi
]
keep
1
swap
dup
[
word-break-next
]
curry
find-index-from
drop
nip
or*
;