Convert a character to full
folded case if defined, else to
itself.
This function is mainly useful for performing caseless (also known as
case insensitive) string comparisons.
A string
x is a caseless match for a string
y if and
only if:
foldMap toCaseFoldString x == foldMap toCaseFoldString y
The result string may have more than one character, and may differ
from applying
toLowerString to the input string. For instance,
“ﬓ” (
U+FB13 Armenian small ligature men now) is case folded
to the sequence “մ” (
U+0574 Armenian small letter men)
followed by “ն” (
U+0576 Armenian small letter now), while “µ”
(
U+00B5 micro sign) is case folded to “μ” (
U+03BC
Greek small letter mu) instead of itself.
It uses the character property
Case_Folding.
toCaseFoldString c == foldMap toCaseFoldString (toCaseFoldString c)