String.equivalent-question-mark

You're seeing just the function equivalent-question-mark, go back to String module for more information.
Link to this function

equivalent?(string1, string2)

View Source

Specs

equivalent?(t(), t()) :: boolean()

Returns true if string1 is canonically equivalent to string2.

It performs Normalization Form Canonical Decomposition (NFD) on the strings before comparing them. This function is equivalent to:

String.normalize(string1, :nfd) == String.normalize(string2, :nfd)

If you plan to compare multiple strings, multiple times in a row, you may normalize them upfront and compare them directly to avoid multiple normalization passes.

Examples

iex> String.equivalent?("abc", "abc")
true

iex> String.equivalent?("man\u0303ana", "mañana")
true

iex> String.equivalent?("abc", "ABC")
false

iex> String.equivalent?("nø", "nó")
false