Collation and weak comparison


The unicode.collation vocabulary implements the Unicode Collation Algorithm. The Unicode Collation Algorithm (UTS #10) forms a reasonable way to sort strings when accounting for all of the characters in Unicode. It is far preferred over code point order when sorting for human consumption, in user interfaces. At the moment, only the default Unicode collation element table (DUCET) is used, but a more accurate collation would take locale into account. The following words are useful for collation directly:
sort-strings ( strings -- sorted )

collation-key/nfd ( string -- key nfd )

string<=> ( str1 str2 -- <=> )


Predicates for weak equality testing:
primary= ( str1 str2 -- ? )

secondary= ( str1 str2 -- ? )

tertiary= ( str1 str2 -- ? )

quaternary= ( str1 str2 -- ? )