Cldr.Collation.sort
You're seeing just the function
sort
, go back to Cldr.Collation module for more information.
Specs
Sorts a list of strings according to the Unicode collation rules with the CLDR root collation which is based upon the Unicode DUCET table.
This collation does not aim to provide precisely correct ordering for each language and script; tailoring would be required for correct language handling in almost all cases.
The goal is instead to have all the other characters, those that are not tailored, show up in a reasonable order.
Arguments
strings
is an enumerable of typet:String.t()
options
is a keyword list of options
Options
casing
is either:sensitive
or:insensitive
indicating if collation is to be case sensitive or not. The default is:insensitive
Returns
- An ordered list of
t:String.t()
Examples
iex> Cldr.Collation.sort ["á", "b", "A"]
["á", "A", "b"]
iex> Cldr.Collation.sort ["á", "b", "A"], casing: :sensitive
["A", "á", "b"]