Unicode String v0.1.0 Unicode.String.Case.Folding View Source

Implements the Unicode Case Folding algorithm.

The intention of case folding is to faciliate 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

  • 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

  • The case folded string

Notes

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