case package:unicode-data

Case and case mapping related functions. This module provides full predicates and mappings that are not compatible with those in Data.Char, which rely on simple properties. See Unicode.Char.Case.Compat for a drop-in replacement of the functions in Data.Char.
Returns the full folded case mapping of a character if the character is changed, else nothing. It uses the character property Case_Folding.
Ll: Letter, Lowercase
Lt: Letter, Titlecase
Lu: Letter, Uppercase
Returns True for lower-case characters. It uses the character property Lowercase. See: isLower for the legacy predicate.
Returns True for upper-case characters. It uses the character property Uppercase. Note: it does not match title-cased letters. Those are matched using: generalCategory c == TitlecaseLetter. See: isUpper for the legacy predicate.
Returns the full lower case mapping of a character if the character is changed, else nothing. It uses the character property Lowercase_Mapping.
Returns the full title case mapping of a character if the character is changed, else nothing. It uses the character property Titlecase_Mapping.
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)
Returns the full upper case mapping of a character if the character is changed, else nothing. It uses the character property Uppercase_Mapping.