Data.Char8

word8-0.1.2: Word8 library

Safe Haskell | None
Language | Haskell2010

Data.Char8

Contents

- Character classification
- Subranges
- Case conversion

Description

Char8 library to be used with Data.ByteString.Char8. All function assumes that only 8bit part of `Char` is used and it is encoded in Latin-1 (ISO-8859-1). All utility functions are supposed to work as if those of `Char`. Exceptions are described in the function documentations.

Base library 4.7 (GHC 7.8) or earlier is based on Unicode 6. Base library 4.8 (GHC 7.10) or later is based on Unicode 7. `isLower`, `isSymbol` and `isPunctuation` behave differently.

Synopsis

- isControl :: Char -> Bool
- isSpace :: Char -> Bool
- isLower :: Char -> Bool
- isUpper :: Char -> Bool
- isAlpha :: Char -> Bool
- isAlphaNum :: Char -> Bool
- isPrint :: Char -> Bool
- isDigit :: Char -> Bool
- isOctDigit :: Char -> Bool
- isHexDigit :: Char -> Bool
- isLetter :: Char -> Bool
- isMark :: Char -> Bool
- isNumber :: Char -> Bool
- isPunctuation :: Char -> Bool
- isSymbol :: Char -> Bool
- isSeparator :: Char -> Bool
- isAscii :: Char -> Bool
- isLatin1 :: Char -> Bool
- isAsciiUpper :: Char -> Bool
- isAsciiLower :: Char -> Bool
- toUpper :: Char -> Char
- toLower :: Char -> Char
- toTitle :: Char -> Char

# Character classification

isControl :: Char -> Bool #

isSpace :: Char -> Bool #

isLower :: Char -> Bool #

This function returns `True` for 170 and 186 in Unicode 6. But it returns `False` in Unicode 7.

isUpper :: Char -> Bool #

isAlpha :: Char -> Bool #

isAlphaNum :: Char -> Bool #

isPrint :: Char -> Bool #

isDigit :: Char -> Bool #

isOctDigit :: Char -> Bool #

isHexDigit :: Char -> Bool #

isLetter :: Char -> Bool #

isMark :: Char -> Bool #

isNumber :: Char -> Bool #

isPunctuation :: Char -> Bool #

This function returns `False` for 167 and 182 in Unicode 6. But it returns `True` in Unicode 7.

isSymbol :: Char -> Bool #

This function returns `True` for 167 and 182 in Unicode 6. But it returns `False` in Unicode 7.

isSeparator :: Char -> Bool #

# Subranges

isAscii :: Char -> Bool #

isLatin1 :: Char -> Bool #

isAsciiUpper :: Char -> Bool #

isAsciiLower :: Char -> Bool #

# Case conversion

toUpper :: Char -> Char #

Micro sign/mu (0xb5) and small letter Y with diaeresis (0xff) remain the same.

toLower :: Char -> Char #

toTitle :: Char -> Char #

Micro sign/mu (0xb5) and small letter Y with diaeresis (0xff) remain the same.