Expand description
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.
Structs§
- The
Collator
struct is the entry point for this library’s API. It defines the options to be used in collation. The methodcollate
will then compare two string references (or byte slices) according to the selected options, and return anOrdering
value.
Enums§
- 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
Root
locale represents the table in its unmodified form.)