on 727d708 help sign in
elk/libraries/Char.elm
50 lines 1.1 kB history raw
2module Char where
4import Native.Char as Native
6-- True for upper case letters.
7isUpper : Char -> Bool
8isUpper = Native.isUpper
10-- True for lower case letters.
11isLower : Char -> Bool
12isLower = Native.isLower
14-- True for ASCII digits (`0..9`).
15isDigit : Char -> Bool
16isDigit = Native.isDigit
18-- True for ASCII octal digits (`0..7`).
19isOctDigit : Char -> Bool
20isOctDigit = Native.isOctDigit
22-- True for ASCII hexadecimal digits (`0..9a..fA..F`).
23isHexDigit : Char -> Bool
24isHexDigit = Native.isHexDigit
26-- Convert to upper case.
27toUpper : Char -> Char
28toUpper = Native.toUpper
30-- Convert to lower case.
31toLower : Char -> Char
32toLower = Native.toLower
34-- Convert to upper case, according to any locale-specific case mappings.
35toLocaleUpper : Char -> Char
36toLocaleUpper = Native.toLocaleUpper
38-- Convert to lower case, according to any locale-specific case mappings.
39toLocaleLower : Char -> Char
40toLocaleLower = Native.toLocaleLower
42type KeyCode = Int
44-- Convert to unicode.
45toCode : Char -> Int
46toCode = Native.toCode
48-- Convert from unicode.
49fromCode : Int -> Char
50fromCode = Native.fromCode