Safe Haskell | None |
---|
Latin-1 utility functions.
- data IsLatin1 = IsLatin1
- isLatin1 :: Property IsLatin1 v => v -> Bool
- type Latin1 α = Checked IsLatin1 α
- asciiIsLatin1 :: Ascii α -> Latin1 α
- maybeLatin1 :: Char -> Maybe Word8
- latin1 :: Char -> Word8
- isControl :: Char -> Bool
- isPrintable :: Char -> Bool
- isWhiteSpace :: Char -> Bool
- isLower :: Char -> Bool
- isUpper :: Char -> Bool
- toLower :: Char -> Char
- toUpper :: Char -> Char
- isAlpha :: Char -> Bool
- isAlphaNum :: Char -> Bool
- isControl8 :: Word8 -> Bool
- isPrintable8 :: Word8 -> Bool
- isWhiteSpace8 :: Word8 -> Bool
- isLower8 :: Word8 -> Bool
- isUpper8 :: Word8 -> Bool
- toLower8 :: Word8 -> Word8
- toUpper8 :: Word8 -> Word8
- isAlpha8 :: Word8 -> Bool
- isAlphaNum8 :: Word8 -> Bool
Latin-1 checks
asciiIsLatin1 :: Ascii α -> Latin1 αSource
ASCII values are Latin-1 values.
maybeLatin1 :: Char -> Maybe Word8Source
Map a character to its Latin-1 encoding if possible, otherwise
return Nothing
.
Character properties
isPrintable :: Char -> BoolSource
Test if a character is a Latin-1 printable character.
isWhiteSpace :: Char -> BoolSource
Test if a character is a Latin-1 whitespace character.
Map lower-case Latin-1 letters to the corresponding upper-case letters, leaving other characters as is.
Map upper-case Latin-1 letters to the corresponding lower-case letters, leaving other characters as is.
isAlphaNum :: Char -> BoolSource
Test if a character is either a Latin-1 letter or a decimal digit.
Byte properties
isControl8 :: Word8 -> BoolSource
Test if a byte is the encoding of a Latin-1 control character.
isPrintable8 :: Word8 -> BoolSource
Test if a byte is the encoding of a Latin-1 printable character.
isWhiteSpace8 :: Word8 -> BoolSource
Test if a byte is the encoding of a Latin-1 whitespace character.
toLower8 :: Word8 -> Word8Source
Map the encodings of lower-case Latin-1 letters to the encodings of the corresponding upper-case letters, leaving other bytes as is.
toUpper8 :: Word8 -> Word8Source
Map the encodings of upper-case Latin-1 letters to the encodings of the corresponding lower-case letters, leaving other bytes as is.
isAlphaNum8 :: Word8 -> BoolSource
Test if a byte is the encoding of either a Latin-1 letter or a decimal digit.