Char.md
May 18, 2018 ยท View on GitHub
Module Elm.Char
Functions for working with characters. Character literals are enclosed in
'a'pair of single quotes.
Implemented using Purescript's Data.Char module.
KeyCode
type KeyCode = Int
Keyboard keys can be represented as integers. These are called key codes. You can use
toCodeandfromCodeto convert between key codes and characters.
toCode
toCode :: Char -> KeyCode
Convert to key code.
fromCode
fromCode :: KeyCode -> Char
Convert from key code.
isUpper
isUpper :: Char -> Bool
True for upper case ASCII letters.
isLower
isLower :: Char -> Bool
True for lower case ASCII letters.
isDigit
isDigit :: Char -> Bool
True for ASCII digits
[0-9].
isOctDigit
isOctDigit :: Char -> Bool
True for ASCII octal digits
[0-7].
isHexDigit
isHexDigit :: Char -> Bool
True for ASCII hexadecimal digits
[0-9a-fA-F].
toLocaleUpper
toLocaleUpper :: Char -> Char
Convert to upper case, according to any locale-specific case mappings.
toLocaleLower
toLocaleLower :: Char -> Char
Convert to lower case, according to any locale-specific case mappings.
Re-exported from Data.Char:
toUpper
toUpper :: Char -> Char
Converts a character to uppercase.
toLower
toLower :: Char -> Char
Converts a character to lowercase.