hask.Data.Char
– The Data.Char
¶
-
hask.Data.Char.
isControl
(*args, **kwargs)¶ isControl :: str -> bool
Selects control characters, which are the non-printing characters of the Latin-1 subset of Unicode.
-
hask.Data.Char.
isSpace
(*args, **kwargs)¶ isSpace :: str -> bool
Returns True for any Unicode space character, and the control characters t, n, r, f, v.
-
hask.Data.Char.
isLower
(*args, **kwargs)¶ isLower :: str -> bool
Selects lower-case alphabetic Unicode characters (letters).
-
hask.Data.Char.
isUpper
(*args, **kwargs)¶ isUpper :: str -> bool
Selects upper-case or title-case alphabetic Unicode characters (letters). Title case is used by a small number of letter ligatures like the single-character form of Lj.
-
hask.Data.Char.
isAlpha
(*args, **kwargs)¶ isAlpha :: str -> bool
Selects alphabetic Unicode characters (lower-case, upper-case and title-case letters, plus letters of caseless scripts and modifiers letters). This function is equivalent to isLetter.
-
hask.Data.Char.
isAlphaNum
(*args, **kwargs)¶ isAlphaNum :: str -> bool
Selects alphabetic or numeric digit Unicode characters.
Note that numeric digits outside the ASCII range are selected by this function but not by isDigit. Such digits may be part of identifiers but are not used by the printer and reader to represent numbers.
-
hask.Data.Char.
isPrint
(*args, **kwargs)¶ isPrint :: str -> bool
Selects printable Unicode characters (letters, numbers, marks, punctuation, symbols and spaces).
-
hask.Data.Char.
isDigit
(*args, **kwargs)¶ isDigit :: str -> bool
Selects ASCII digits, i.e. ‘0’..‘9’.
-
hask.Data.Char.
isOctDigit
(*args, **kwargs)¶ isOctDigit :: str -> bool
Selects ASCII octal digits, i.e. ‘0’..‘7’.
-
hask.Data.Char.
isHexDigit
(*args, **kwargs)¶ isHexDigit :: str -> bool
Selects ASCII hexadecimal digits, i.e. ‘0’..‘9’, ‘a’..’f’, ‘A’..’F’.
-
hask.Data.Char.
isLetter
(*args, **kwargs)¶ isLetter :: str -> bool
Selects alphabetic Unicode characters (lower-case, upper-case and title-case letters, plus letters of caseless scripts and modifiers letters). This function is equivalent to isAlpha.
-
hask.Data.Char.
isMark
(*args, **kwargs)¶ isMark :: str -> bool
Selects Unicode mark characters, e.g. accents and the like, which combine with preceding letters.
-
hask.Data.Char.
isNumber
(*args, **kwargs)¶ isNumber :: str -> bool
Selects Unicode numeric characters, including digits from various scripts, Roman numerals, etc.
-
hask.Data.Char.
isPunctuation
(*args, **kwargs)¶ isPunctuation :: str -> bool
Selects Unicode punctuation characters, including various kinds of connectors, brackets and quotes.
-
hask.Data.Char.
isSymbol
(*args, **kwargs)¶ isSymbol :: str -> bool
Selects Unicode symbol characters, including mathematical and currency symbols.
-
hask.Data.Char.
isSeparator
(*args, **kwargs)¶ isSeparator :: str -> bool
Selects Unicode space and separator characters.
-
hask.Data.Char.
isAscii
(*args, **kwargs)¶ isAscii :: str -> bool
Selects the first 128 characters of the Unicode character set, corresponding to the ASCII character set.
-
hask.Data.Char.
isLatin1
(*args, **kwargs)¶ isLatin1 :: str -> bool
Selects the first 256 characters of the Unicode character set, corresponding to the ISO 8859-1 (Latin-1) character set.
-
hask.Data.Char.
isAsciiUpper
(*args, **kwargs)¶ isAsciiUpper :: str -> bool
Selects ASCII upper-case letters, i.e. characters satisfying both isAscii and isUpper.
-
hask.Data.Char.
isAsciiLower
(*args, **kwargs)¶ isAsciiLower :: str -> bool
Selects ASCII lower-case letters, i.e. characters satisfying both isAscii and isLower.
-
hask.Data.Char.
toLower
(*args, **kwargs)¶ toLower :: str -> str
Convert a letter to the corresponding lower-case letter, if any. Any other character is returned unchanged.
-
hask.Data.Char.
toUpper
(*args, **kwargs)¶ toUpper :: str -> str
Convert a letter to the corresponding upper-case letter, if any. Any other character is returned unchanged.
-
hask.Data.Char.
toTitle
(*args, **kwargs)¶ toTitle :: str -> str
Convert a letter to the corresponding title-case or upper-case letter, if any. (Title case differs from upper case only for a small number of ligature letters.) Any other character is returned unchanged.
-
hask.Data.Char.
digitToInt
(*args, **kwargs)¶ digitToInt :: str -> int
Convert a single digit Char to the corresponding Int. This function fails unless its argument satisfies isHexDigit, but recognises both upper and lower-case hexadecimal digits (i.e. ‘0’..‘9’, ‘a’..’f’, ‘A’..’F’).
-
hask.Data.Char.
intToDigit
(*args, **kwargs)¶ intToDigit :: int -> str
Convert an Int in the range 0..15 to the corresponding single digit Char. This function fails on other inputs, and generates lower-case hexadecimal digits.