unicode.breaks: use find-index-from instead of slices.

db4
John Benediktsson 2012-08-24 12:18:12 -07:00
parent b364bafeff
commit 8a872a25b5
1 changed files with 3 additions and 3 deletions

View File

@ -252,9 +252,9 @@ word-table set-global
PRIVATE>
: first-word ( str -- i )
[ unclip-slice word-break-prop over ] keep
'[ _ word-break-next ] find-index drop
nip swap length or 1 + ;
[ [ length ] [ first word-break-prop ] bi ] keep
1 swap dup '[ _ word-break-next ] find-index-from
drop nip swap or ;
: >words ( str -- words )
[ first-word ] >pieces ;