Haskell Core Libraries (base package)ParentContentsIndex
Data.Char
Portability portable
Stability provisional
Maintainer libraries@haskell.org
Description
The Char type and associated operations.
Synopsis
data Char
isAscii :: Char -> Bool
isLatin1 :: Char -> Bool
isControl :: Char -> Bool
isPrint :: Char -> Bool
isSpace :: Char -> Bool
isUpper :: Char -> Bool
isLower :: Char -> Bool
isAlpha :: Char -> Bool
isDigit :: Char -> Bool
isOctDigit :: Char -> Bool
isHexDigit :: Char -> Bool
isAlphaNum :: Char -> Bool
toUpper :: Char -> Char
toLower :: Char -> Char
digitToInt :: Char -> Int
intToDigit :: Int -> Char
ord :: Char -> Int
chr :: Int -> Char
readLitChar :: ReadS Char
showLitChar :: Char -> ShowS
lexLitChar :: ReadS String
type String = [Char]
Documentation
data Char

The character type Char is an enumeration whose values represent Unicode characters. A character literal in Haskell has type Char.

To convert a Char to or from an Int, use toEnum and fromEnum from the Enum class respectively (equivalently ord and chr also do the trick).

Instances
Error [Char]
IArray UArray Char
(Ix ix) => Eq (UArray ix Char)
(Ix ix) => Ord (UArray ix Char)
(Ix ix, Show ix) => Show (UArray ix Char)
MArray (STUArray s) Char (ST s)
(Ix ix, Show ix) => Show (DiffUArray ix Char)
IArray (IOToDiffArray IOUArray) Char
MArray IOUArray Char IO
Typeable Char
Ix Char
Eq Char
Ord Char
CCallable Char
CReturnable Char
Bounded Char
Enum Char
Read Char
Show Char
Storable Char
Random Char
HTML Char
isAscii :: Char -> Bool
isLatin1 :: Char -> Bool
isControl :: Char -> Bool
isPrint :: Char -> Bool
isSpace :: Char -> Bool
isUpper :: Char -> Bool
isLower :: Char -> Bool
isAlpha :: Char -> Bool
isDigit :: Char -> Bool
isOctDigit :: Char -> Bool
isHexDigit :: Char -> Bool
isAlphaNum :: Char -> Bool
toUpper :: Char -> Char
toLower :: Char -> Char
digitToInt :: Char -> Int
intToDigit :: Int -> Char
ord :: Char -> Int
chr :: Int -> Char
readLitChar :: ReadS Char
showLitChar :: Char -> ShowS
lexLitChar :: ReadS String
type String = [Char]
A String is a list of characters. String constants in Haskell are values of type String.
Produced by Haddock version 0.3