word8
Safe HaskellNone
LanguageHaskell2010

Data.Char8

Description

Char8 library to be used with Data.ByteString.Char8. All functions assume that Char is in the Latin-1 range (ISO-8859-1). All utility functions are supposed to work like those of Data.Char. Exceptions are described in the function documentations.

Synopsis

Character classification

isControl :: Char -> Bool Source #

Is it a control character

isSpace :: Char -> Bool Source #

Is it white space

isLower :: Char -> Bool Source #

Is it a lower case character

This function returns False for 170 (ª) and 186 (º).

isUpper :: Char -> Bool Source #

Is it an upper case character

isAlpha :: Char -> Bool Source #

Is it an alphabet letter

Synonym for isLetter

isAlphaNum :: Char -> Bool Source #

Is it an alphabet letter or a number

isPrint :: Char -> Bool Source #

Is the character printable

isDigit :: Char -> Bool Source #

Is the character a digit (0-9)

isOctDigit :: Char -> Bool Source #

Is the character an octal digit (0-7)

isHexDigit :: Char -> Bool Source #

Is the character a hexadecimal digit (0-9a-fA-F)

isLetter :: Char -> Bool Source #

Is it an alphabet letter

Synonym for isAlpha

isMark :: Char -> Bool Source #

A Latin-1 character is never a mark

Synonymous with const False

isNumber :: Char -> Bool Source #

Is the character a number

isPunctuation :: Char -> Bool Source #

Is it a punctuation character

This function returns True for 167 (§) and 182 (¶).

isSymbol :: Char -> Bool Source #

Is it a symbol character

This function returns False for 167 (§) and 182 (¶).

isSeparator :: Char -> Bool Source #

Is it a (non-breaking) space

Subranges

isAscii :: Char -> Bool Source #

Is the character in the ASCII range

isLatin1 :: Char -> Bool Source #

Is the character in the Latin-1 range

isAsciiUpper :: Char -> Bool Source #

Is the character an upper case ASCII letter (A-Z)

isAsciiLower :: Char -> Bool Source #

Is the character a lower case ASCII letter (a-z)

Case conversion

toUpper :: Char -> Char Source #

Changes the character to the upper case variant, if possible.

Micro sign/mu (µ) and small letter Y with diaeresis (ÿ) remain the same.

toLower :: Char -> Char Source #

Changes the character to the lower case variant, if possible.

toTitle :: Char -> Char Source #

Synonym for toUpper