This crate provides a basic implementation of the Unicode Collation Algorithm. There is really
just one method,
collate, belonging to a struct,
Collator, which sets a few options. Despite
the bare-bones API, this implementation conforms to the standard and allows for the use of the
CLDR root collation order; so it may indeed be useful.
Collatorstruct is the entry point for this library’s API. It defines the options to be used in collation. The method
collatewill then compare two string references (or byte slices) according to the selected options, and return an
- This enum provides for a choice of which locale to use with the CLDR table of character weights. The default,
Root, represents the CLDR root collation order. At the moment, there is only one other choice:
ArabicScript. But the list should grow over time.
- This enum provides for a choice of which collation tailoring (or table of character weights) to use. With the CLDR table, there is a further choice of locale. (The
Rootlocale represents the table in its unmodified form.)