View Source Unicode.String.Case.Folding (Unicode String v1.1.0)

Implements the Unicode Case Folding algorithm.

The intention of case folding is to facilitate case-insensitive string comparisons. It is not intended to be a general purpose transformation.

Although case folding does generally use lower case as its normal form, it is not true for all scripts and codepoints. Therefore case folding should not be used as an alternative to String.downcase/1.

Link to this section Summary

Link to this section Functions

Case fold a string.

Returns a string after applying the Unicode Case Folding algorithm.

It is recommended to call Unicode.String.fold/1,2 instead of this function.

arguments

Arguments

  • string is any String.t()

  • type is one of :full or :simple. The default is :full.

  • mode is either :turkic or nil. The default is nil.

returns

Returns

  • The case folded string

notes

Notes

  • No normalization is applied to the string on either input or output.