Handbook
Glossary
word-break? ( str i table-entry -- ? )
Vocabulary
unicode
.
breaks
.
private
Inputs
str
an
object
i
an
object
table-entry
an
object
Outputs
?
an
object
Definition
USING:
combinators
combinators.short-circuit
interval-maps
kernel
sequences
;
IN:
unicode.breaks.private
::
word-break?
( str i table-entry -- ? )
str i table-entry
{
{
t
[
2drop
f
]
}
{
f
[
2drop
t
]
}
{
check-AHletter-after
[
dupd
walk-up
{
[
wALetter
property-not=
]
[
wHebrew_Letter
property-not=
]
}
2||
]
}
{
check-AHletter-before
[
dupd
walk-down
{
[
wALetter
property-not=
]
[
wHebrew_Letter
property-not=
]
}
2||
]
}
{
check-Hebrew-letter-after
[
dupd
walk-up
wHebrew_Letter
property-not=
]
}
{
check-Hebrew-letter-before
[
dupd
walk-down
wHebrew_Letter
property-not=
]
}
{
check-number-after
[
dupd
walk-up
wNumeric
property-not=
]
}
{
check-number-before
[
dupd
walk-down
wNumeric
property-not=
]
}
{
check-Extended_Pictographic
[
swap
?nth
extended-pictographic-table
interval-key?
]
}
{
check-RI-pair
[
2drop
f
:>
ri-even?! i str
[
regional?
[
ri-even?
not
ri-even?!
f
]
[
t
]
if
]
find-last-from
2drop
ri-even?
not
]
}
}
case
;