cldr_collation

Common Locale Data Repository (CLDR) icu4c NIF-based collator providing locale-sensitive sorting.


License
Other

Documentation

Cldr Collation

A NIF-based Unicode collator based upon the Unicode library libicu4c. Builds upon the erlang library erlang-ucol by Benoît Chesneau benoitc@e-engura.org and Nicolas Dufour nrdufour@gmail.com

This initial version uses only the "root" locale collator which is the CLDR DUCET collator.

Requirements

This module requires the package icu4c be installed on your system.

For OSX users, the standard installation that is delivered with MAC OS is used. Not separate installation is required.

Examples

iex> Cldr.Collation.compare("a", "A", casing: :insensitive)
:eq

iex> Cldr.Collation.compare("a", "A", casing: :sensitive)
:lt

Installation

The package can be installed by adding cldr_collation to your list of dependencies in mix.exs:

def deps do
  [
    {:cldr_collation, "~> 0.1.0"}
  ]
end