Handbook
Glossary
collation-key/nfd ( string -- key nfd )
Collation and weak comparison
Prev:
sort-strings ( strings -- sorted )
Next:
string<=> ( str1 str2 -- <=> )
Vocabulary
unicode
Inputs
string
a
string
Outputs
key
a
byte-array
nfd
an
object
Word description
This takes a string and gives a representation of the collation key, which can be compared with
<=>
. The representation is according to the DUCET.
Definition
USING:
kernel
unicode.collation
unicode.collation.private
;
IN:
unicode
:
collation-key/nfd
( string -- key nfd )
nfd
[
string>graphemes
graphemes>weights
filter-ignorable
weights>bytes
]
keep
;