elm-lang/core/4.0.4

NOTE: this package moved to elm/core

NOTE: this package is not compatible with Elm 0.19.1

Char

Functions for working with characters. Character literals are enclosed in 'a' pair of single quotes.

Classification

isUpper : Char -> Bool

True for upper case ASCII letters.

isLower : Char -> Bool

True for lower case ASCII letters.

isDigit : Char -> Bool

True for ASCII digits [0-9].

isOctDigit : Char -> Bool

True for ASCII octal digits [0-7].

isHexDigit : Char -> Bool

True for ASCII hexadecimal digits [0-9a-fA-F].

Conversion

toUpper : Char -> Char

Convert to upper case.

toLower : Char -> Char

Convert to lower case.

toLocaleUpper : Char -> Char

Convert to upper case, according to any locale-specific case mappings.

toLocaleLower : Char -> Char

Convert to lower case, according to any locale-specific case mappings.

Key Codes

type alias KeyCode =
Int

Keyboard keys can be represented as integers. These are called key codes. You can use toCode and fromCode to convert between key codes and characters.

toCode : Char -> KeyCode

Convert to key code.

fromCode : KeyCode -> Char

Convert from key code.