Unicode String v0.1.0 Unicode.String View Source
Link to this section Summary
Functions
Compares two strings in a case insensitive manner.
Link to this section Functions
Compares two strings in a case insensitive manner.
Case folding is applied to the two string
arguments which are then compared with the
==
operator.
Arguments
string_a
andstring_b
are two strings to be comparedtype
is the case folding type to be applied. The alternatives are:full
,:simple
and:turkic
. The default is:full
.
Returns
true
orfalse
Notes
This function applies the Unicode Case Folding algorithm
The algorithm does not apply any treatment to diacritical marks hence "compare strings without accents" is not part of this function.
Examples
iex> Unicode.String.equals_ignoring_case? "ABC", "abc"
true
iex> Unicode.String.equals_ignoring_case? "beißen", "beissen"
true
iex> Unicode.String.equals_ignoring_case? "grüßen", "grussen"
false