Copyright | (c) 2020-2021 Sam May |
---|---|
License | MPL-2.0 |
Maintainer | ag.eitilt@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell98 |
Web.Willow.Common.Encoding.Character
Contents
Description
Synopsis
- replacementChar :: Char
- asciiWhitespace :: [Char]
- isAsciiAlpha :: Char -> Bool
- isAsciiAlphaNum :: Char -> Bool
- isAsciiWhitespace :: Char -> Bool
- toAsciiLower :: Char -> Char
- toAsciiUpper :: Char -> Char
Documentation
replacementChar :: Char #
The Unicode character \xFFFD
, safely (but unrecoverably) representing
an illegal, invalid, or otherwise unknown character.
ASCII Character Ranges
asciiWhitespace :: [Char] #
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 #
Infra:
ASCII alpha
Test whether the character is an alphabetic character in the ASCII range
([A-Za-z]
).
isAsciiAlphaNum :: Char -> Bool #
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 #
Infra:
ASCII whitespace
Test whether the character fits the spec's definition of asciiWhitespace
.
toAsciiLower :: Char -> Char #
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 #
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 'á'
'á'