HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

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).