Handbook
Glossary
string<=> ( str1 str2 -- <=> )
Collation and weak comparison
Prev:
collation-key/nfd ( string -- key nfd )
Next:
primary= ( str1 str2 -- ? )
Vocabulary
unicode
Inputs
str1
a
string
str2
a
string
Outputs
<=>
one of +lt+, +gt+ or +eq+
Word description
This word takes two strings and compares them using the UCA with the DUCET, using code point order as a tie-breaker.
Definition
USING:
arrays
math.order
;
IN:
unicode
:
string<=>
( str1 str2 -- <=> )
[
collation-key/nfd
2array
]
compare
;