HORIZON HASKELLDocslts/ghc-9.14.x7a6c33e2026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 7a6c33e · 2026-10-12

Moduletext-latin1-0.3.1Haskell98

Text.Ascii

ASCII utility functions.

Contents
  1. ASCII checks
  2. Character properties
  3. Byte properties
Synopsis

ASCII checks

datadata IsAscii
#
Instances20Property, Eq, Ord, Show, IsString, Semigroup, …

Character properties

valuetoLower :: Char -> Char

Map lower-case ASCII letters to the corresponding upper-case letters, leaving other characters as is.

valuetoUpper :: Char -> Char

Map upper-case ASCII letters to the corresponding lower-case letters, leaving other characters as is.

Byte properties

valuetoLower8 :: Word8 -> Word8

Map the encodings of lower-case ASCII letters to the encodings of the corresponding upper-case letters, leaving other bytes as is.

valuetoUpper8 :: Word8 -> Word8

Map the encodings of upper-case ASCII letters to the encodings of the corresponding lower-case letters, leaving other bytes as is.

valueisHexDigit8 :: Word8 -> Bool

Test if a byte is the encoding of a hexadecimal digit ('0' ... '9' or a ... f or A ... F).

Test if a byte is the encoding of a non-zero hexadecimal digit ('1' ... '9' or a ... f or A ... F).