Packages

Elixir implementation of the Cldr Collation algorithm, providing language-aware string sorting and comparison. An opt-in NIF is provided for high performance collating.

Current section

Files

Jump to
ex_cldr_collation lib cased sensitive.ex
Raw

lib/cased/sensitive.ex

defmodule Cldr.Collation.Sensitive do
@moduledoc """
Compare two strings using the UCA
in a case-sensitive manner
"""
@sensitive 0
@dialyzer {:no_return, compare: 2}
def compare(a, b) do
Cldr.Collation.nif_compare(a, b, @sensitive)
end
end