willow-0.1.0.0: An implementation of the web Document Object Model, and its rendering.
Copyright(c) 2020-2021 Sam May
LicenseMPL-2.0
Maintainerag.eitilt@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell98

Web.Willow.Common.Encoding.Character

Description

 
Synopsis

Documentation

replacementChar :: Char Source #

The Unicode character \xFFFD, safely (but unrecoverably) representing an illegal, invalid, or otherwise unknown character.

ASCII Character Ranges

asciiWhitespace :: [Char] Source #

Infra: ASCII whitespace

The ASCII characters defined as whitespace in the HTML standard. Unlike Haskell's isSpace and anything following that example, does not include \x11 (VT).

isAsciiAlpha :: Char -> Bool Source #

Infra: ASCII alpha

Test whether the character is an alphabetic character in the ASCII range ([A-Za-z]).

isAsciiAlphaNum :: Char -> Bool Source #

Infra: ASCII alphanumeric

Test whether the character is either an alphabetic character or a digit in the ASCII range ([A-Za-z0-9]).

isAsciiWhitespace :: Char -> Bool Source #

Infra: ASCII whitespace

Test whether the character fits the spec's definition of asciiWhitespace.

toAsciiLower :: Char -> Char Source #

Convert an uppercase, alphabetic, ASCII character to its lowercase form. This has the same semantics within the ASCII range as toLower, but leaves any non-ASCII characters unchanged.

>>> toAsciiLower 'A'
'a'
>>> toAsciiLower 'Á'
'Á'

toAsciiUpper :: Char -> Char Source #

Convert a lowercase, alphabetic, ASCII character to its uppercase form. This has the same semantics within the ASCII range as toUpper, but leaves any non-ASCII characters unchanged.

>>> toAsciiUpper 'a'
'A'
>>> toAsciiUpper 'á'
'á'