| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Data.Word8
Description
Word8 library to be used with Data.ByteString.
All functions assume that the Word8 is encoded in Latin-1 (ISO-8859-1).
All utility functions are supposed to work like those of Data.Char.
Exceptions are described in the function documentations.
Synopsis
- data Word8
- isControl :: Word8 -> Bool
- isSpace :: Word8 -> Bool
- isLower :: Word8 -> Bool
- isUpper :: Word8 -> Bool
- isAlpha :: Word8 -> Bool
- isAlphaNum :: Word8 -> Bool
- isPrint :: Word8 -> Bool
- isDigit :: Word8 -> Bool
- isOctDigit :: Word8 -> Bool
- isHexDigit :: Word8 -> Bool
- isLetter :: Word8 -> Bool
- isMark :: Word8 -> Bool
- isNumber :: Word8 -> Bool
- isPunctuation :: Word8 -> Bool
- isSymbol :: Word8 -> Bool
- isSeparator :: Word8 -> Bool
- isAscii :: Word8 -> Bool
- isLatin1 :: Word8 -> Bool
- isAsciiUpper :: Word8 -> Bool
- isAsciiLower :: Word8 -> Bool
- toUpper :: Word8 -> Word8
- toLower :: Word8 -> Word8
- toTitle :: Word8 -> Word8
- _nul :: Word8
- _tab :: Word8
- _lf :: Word8
- _vt :: Word8
- _np :: Word8
- _cr :: Word8
- _space :: Word8
- _exclam :: Word8
- _quotedbl :: Word8
- _numbersign :: Word8
- _dollar :: Word8
- _percent :: Word8
- _ampersand :: Word8
- _quotesingle :: Word8
- _parenleft :: Word8
- _parenright :: Word8
- _asterisk :: Word8
- _plus :: Word8
- _comma :: Word8
- _hyphen :: Word8
- _period :: Word8
- _slash :: Word8
- _0 :: Word8
- _1 :: Word8
- _2 :: Word8
- _3 :: Word8
- _4 :: Word8
- _5 :: Word8
- _6 :: Word8
- _7 :: Word8
- _8 :: Word8
- _9 :: Word8
- _colon :: Word8
- _semicolon :: Word8
- _less :: Word8
- _equal :: Word8
- _greater :: Word8
- _question :: Word8
- _at :: Word8
- _A :: Word8
- _B :: Word8
- _C :: Word8
- _D :: Word8
- _E :: Word8
- _F :: Word8
- _G :: Word8
- _H :: Word8
- _I :: Word8
- _J :: Word8
- _K :: Word8
- _L :: Word8
- _M :: Word8
- _N :: Word8
- _O :: Word8
- _P :: Word8
- _Q :: Word8
- _R :: Word8
- _S :: Word8
- _T :: Word8
- _U :: Word8
- _V :: Word8
- _W :: Word8
- _X :: Word8
- _Y :: Word8
- _Z :: Word8
- _bracketleft :: Word8
- _backslash :: Word8
- _bracketright :: Word8
- _circum :: Word8
- _underscore :: Word8
- _grave :: Word8
- _a :: Word8
- _b :: Word8
- _c :: Word8
- _d :: Word8
- _e :: Word8
- _f :: Word8
- _g :: Word8
- _h :: Word8
- _i :: Word8
- _j :: Word8
- _k :: Word8
- _l :: Word8
- _m :: Word8
- _n :: Word8
- _o :: Word8
- _p :: Word8
- _q :: Word8
- _r :: Word8
- _s :: Word8
- _t :: Word8
- _u :: Word8
- _v :: Word8
- _w :: Word8
- _x :: Word8
- _y :: Word8
- _z :: Word8
- _braceleft :: Word8
- _bar :: Word8
- _braceright :: Word8
- _tilde :: Word8
- _del :: Word8
- _nbsp :: Word8
- _ordfeminine :: Word8
- _softhyphen :: Word8
- _mu :: Word8
- _ordmasculine :: Word8
- _s2 :: Word8
- _s3 :: Word8
- _s1 :: Word8
- _1'4 :: Word8
- _1'2 :: Word8
- _3'4 :: Word8
- _Agrave :: Word8
- _Odieresis :: Word8
- _Oslash :: Word8
- _Thorn :: Word8
- _germandbls :: Word8
- _agrave :: Word8
- _odieresis :: Word8
- _oslash :: Word8
- _thorn :: Word8
- _ydieresis :: Word8
Re-exporting
Instances
| PrintfArg Word8 # | |
Defined in Text.Printf | |
| Bits Word8 # | |
Defined in GHC.Internal.Word Methods (.&.) :: Word8 -> Word8 -> Word8 (.|.) :: Word8 -> Word8 -> Word8 xor :: Word8 -> Word8 -> Word8 complement :: Word8 -> Word8 shift :: Word8 -> Int -> Word8 rotate :: Word8 -> Int -> Word8 setBit :: Word8 -> Int -> Word8 clearBit :: Word8 -> Int -> Word8 complementBit :: Word8 -> Int -> Word8 testBit :: Word8 -> Int -> Bool bitSizeMaybe :: Word8 -> Maybe Int shiftL :: Word8 -> Int -> Word8 unsafeShiftL :: Word8 -> Int -> Word8 shiftR :: Word8 -> Int -> Word8 unsafeShiftR :: Word8 -> Int -> Word8 rotateL :: Word8 -> Int -> Word8 | |
| FiniteBits Word8 # | |
Defined in GHC.Internal.Word Methods finiteBitSize :: Word8 -> Int countLeadingZeros :: Word8 -> Int countTrailingZeros :: Word8 -> Int | |
| Bounded Word8 # | |
Defined in GHC.Internal.Word | |
| Enum Word8 # | |
| Ix Word8 # | |
| Num Word8 # | |
| Integral Word8 # | |
| Real Word8 # | |
Defined in GHC.Internal.Word Methods toRational :: Word8 -> Rational | |
| Show Word8 # | |
| Eq Word8 # | |
| Ord Word8 # | |
Functions on bytes
Character classification
isLower :: Word8 -> Bool Source #
Is the byte a lower case character
This function returns False for 170 (ª) and 186 (º).
isAlphaNum :: Word8 -> Bool Source #
Is the byte an alphabet letter or a number
isOctDigit :: Word8 -> Bool Source #
Is the byte an octal digit (0-7)
isHexDigit :: Word8 -> Bool Source #
Is the byte a hexadecimal digit (0-9a-fA-F)
isPunctuation :: Word8 -> Bool Source #
Is the byte a punctuation character
This function returns True for 167 (§) and 182 (¶).
isSymbol :: Word8 -> Bool Source #
Is the byte a symbol character
This function returns False for 167 (§) and 182 (¶).
isSeparator :: Word8 -> Bool Source #
Is the byte a (non-breaking) space
Subranges
isAsciiUpper :: Word8 -> Bool Source #
Is the byte an upper case ASCII letter (A-Z)
isAsciiLower :: Word8 -> Bool Source #
Is the byte a lower case ASCII letter (a-z)
Case conversion
toUpper :: Word8 -> Word8 Source #
Changes the byte to the upper case variant, if possible.
Micro sign/mu (_mu) and small letter Y with diaeresis (_ydieresis) remain the same.
Byte constants
ASCII characters
Null character
BIN: 0b00000000 OCT: 0o000 DEC: 0 HEX: 0x00 HTML: � Char: '\NUL'
Horizontal Tab
BIN: 0b00001001 OCT: 0o011 DEC: 9 HEX: 0x09 HTML: 	 Char: '\HT' or '\t'
Line Feed
BIN: 0b00001010 OCT: 0o012 DEC: 10 HEX: 0x0A HTML: Char: '\LF' or '\n'
Vertical Tabulation
BIN: 0b00001011 OCT: 0o013 DEC: 11 HEX: 0x0B HTML:  Char: '\VT'
Form Feed (New Page)
BIN: 0b00001100 OCT: 0o014 DEC: 12 HEX: 0x0C HTML:  Char: '\FF'
Carriage Return
BIN: 0b00001101 OCT: 0o015 DEC: 13 HEX: 0x0D HTML: Char: '\CR' or '\r'
Space
BIN: 0b00100000 OCT: 0o040 DEC: 32 HEX: 0x20 HTML:   Char: '\SP' or ' '
Exclamation mark
BIN: 0b00100001 OCT: 0o041 DEC: 33 HEX: 0x21 HTML: ! or ! Char: '!'
Double quotes (or speech marks)
BIN: 0b00100010 OCT: 0o042 DEC: 34 HEX: 0x22 HTML: " or " Char: '"'
_numbersign :: Word8 Source #
Number sign (or hash sign, or pound sign)
BIN: 0b00100011 OCT: 0o043 DEC: 35 HEX: 0x23 HTML: # or # Char: '#'
Dollar
BIN: 0b00100100 OCT: 0o044 DEC: 36 HEX: 0x24 HTML: $ or $ Char: '$'
Per cent sign
BIN: 0b00100101 OCT: 0o045 DEC: 37 HEX: 0x25 HTML: % or % Char: '%'
_ampersand :: Word8 Source #
Ampersand
BIN: 0b00100110 OCT: 0o046 DEC: 38 HEX: 0x26 HTML: & or & Char: '&'
_quotesingle :: Word8 Source #
Single quote
BIN: 0b00100111 OCT: 0o047 DEC: 39 HEX: 0x27 HTML: ' or ' Char: '\''
_parenleft :: Word8 Source #
Open parenthesis (or open bracket)
BIN: 0b00101000
OCT: 0o050
DEC: 40
HEX: 0x28
HTML: ( or &lparen;
Char: '('_parenright :: Word8 Source #
Close parenthesis (or close bracket)
BIN: 0b00101001 OCT: 0o051 DEC: 41 HEX: 0x29 HTML: ) or &rparen; Char: ')'
Asterisk
BIN: 0b00101010 OCT: 0o052 DEC: 42 HEX: 0x2A HTML: * or * Char: '*'
Plus
BIN: 0b00101011 OCT: 0o053 DEC: 43 HEX: 0x2B HTML: + or + Char: '+'
Comma
BIN: 0b00101100 OCT: 0o054 DEC: 44 HEX: 0x2C HTML: , or , Char: ','
Hyphen (or minus, or dash)
BIN: 0b00101101 OCT: 0o055 DEC: 45 HEX: 0x2D HTML: - Char: '-'
Period (or dot, or full stop)
BIN: 0b00101110 OCT: 0o056 DEC: 46 HEX: 0x2E HTML: . or . Char: '.'
Slash (or divide)
BIN: 0b00101111 OCT: 0o057 DEC: 47 HEX: 0x2F HTML: / or / Char: '/'
Colon
BIN: 0b00111010 OCT: 0o072 DEC: 58 HEX: 0x3A HTML: : or : Char: ':'
_semicolon :: Word8 Source #
Semicolon
BIN: 0b00111011 OCT: 0o073 DEC: 59 HEX: 0x3B HTML: ; or ; Char: ';'
Less than (or open angled bracket)
BIN: 0b00111100 OCT: 0o074 DEC: 60 HEX: 0x3C HTML: < or < Char: '<'
Equals
BIN: 0b00111101 OCT: 0o075 DEC: 61 HEX: 0x3D HTML: = or = Char: '='
Greater than (or close angled bracket)
BIN: 0b00111110 OCT: 0o076 DEC: 62 HEX: 0x3E HTML: > or > Char: '>'
Question mark
BIN: 0b00111111 OCT: 0o077 DEC: 63 HEX: 0x3F HTML: ? or ? Char: '?'
At sign
BIN: 0b01000000 OCT: 0o100 DEC: 64 HEX: 0x40 HTML: @ or @ Char: '@'
_bracketleft :: Word8 Source #
Opening bracket
BIN: 0b01011011 OCT: 0o133 DEC: 91 HEX: 0x5B HTML: [ or [ Char: '['
_backslash :: Word8 Source #
Backslash
BIN: 0b01011100 OCT: 0o134 DEC: 92 HEX: 0x5C HTML: \ or \ Char: '\'
_bracketright :: Word8 Source #
Closing bracket
BIN: 0b01011101 OCT: 0o135 DEC: 93 HEX: 0x5D HTML: ] or ] Char: ']'
Caret - circumflex
BIN: 0b01011110 OCT: 0o136 DEC: 94 HEX: 0x5E HTML: ^ or ^ Char: '^'
_underscore :: Word8 Source #
Underscore
BIN: 0b01011111 OCT: 0o137 DEC: 95 HEX: 0x5F HTML: _ or _ Char: '_'
Grave accent
BIN: 0b01100000 OCT: 0o140 DEC: 96 HEX: 0x60 HTML: ` or ` Char: '`'
_braceleft :: Word8 Source #
Opening brace
BIN: 0b01111011
OCT: 0o173
DEC: 123
HEX: 0x7B
HTML: { or {
Char: '{'Vertical bar
BIN: 0b01111100 OCT: 0o174 DEC: 124 HEX: 0x7C HTML: | or | Char: '|'
_braceright :: Word8 Source #
Closing brace
BIN: 0b01111101 OCT: 0o175 DEC: 125 HEX: 0x7D HTML: } or } Char: '}'
Equivalency sign - tilde
BIN: 0b01111110 OCT: 0o176 DEC: 126 HEX: 0x7E HTML: ~ or ˜ Char: '~'
Some Latin-1 characters
Non-breaking space
BIN: 0b10100000 OCT: 0o240 DEC: 160 HEX: 0xA0 HTML:   or
_ordfeminine :: Word8 Source #
Feminine ordinal indicator
BIN: 0b10101010 OCT: 0o252 DEC: 170 HEX: 0xAA HTML: ª or ª Char: 'ª'
_softhyphen :: Word8 Source #
Soft hyphen
BIN: 0b10101101 OCT: 0o255 DEC: 173 HEX: 0xAD HTML: ­ or ­
Micro sign (or greek letter mu)
BIN: 0b10110101 OCT: 0o265 DEC: 181 HEX: 0xB5 HTML: µ or µ Char: 'µ'
_ordmasculine :: Word8 Source #
Masculine ordinal indicator
BIN: 0b10111010 OCT: 0o272 DEC: 186 HEX: 0xBA HTML: º or º Char: 'º'
Superscript two - squared
BIN: 0b10110010 OCT: 0o262 DEC: 178 HEX: 0xB2 HTML: ² or ² Char: '²'
Superscript three - cubed
BIN: 0b10110011 OCT: 0o263 DEC: 179 HEX: 0xB3 HTML: ³ or ³ Char: '³'
Superscript one
BIN: 0b10111001 OCT: 0o271 DEC: 185 HEX: 0xB9 HTML: ¹ or ¹ Char: '¹'
Fraction one quarter
BIN: 0b10111100 OCT: 0o274 DEC: 188 HEX: 0xBC HTML: ¼ or ¼ Char: '¼'
Fraction one half
BIN: 0b10111101 OCT: 0o275 DEC: 189 HEX: 0xBD HTML: ½ or ½ Char: '½'
Fraction three quarters
BIN: 0b10111110 OCT: 0o276 DEC: 190 HEX: 0xBE HTML: ¾ or ¾ Char: '¾'
Latin capital letter A with grave
BIN: 0b11000000 OCT: 0o300 DEC: 192 HEX: 0xC0 HTML: À or À Char: 'À'
_Odieresis :: Word8 Source #
Latin capital letter O with diaeresis
BIN: 0b11010110 OCT: 0o326 DEC: 214 HEX: 0xD6 HTML: Ö or Ö Char: 'Ö'
Latin capital letter O with slash
BIN: 0b11011000 OCT: 0o330 DEC: 216 HEX: 0xD8 HTML: Ø or Ø Char: 'Ø'
Latin capital letter THORN
BIN: 0b11011110 OCT: 0o336 DEC: 222 HEX: 0xDE HTML: Þ or Þ Char: 'Þ'
_germandbls :: Word8 Source #
Latin small letter sharp s - ess-zed
BIN: 0b11011111 OCT: 0o337 DEC: 223 HEX: 0xDF HTML: ß or ß Char: 'ß'
Latin small letter a with grave
BIN: 0b11100000 OCT: 0o340 DEC: 224 HEX: 0xE0 HTML: à or à Char: 'à'
_odieresis :: Word8 Source #
Latin small letter o with diaeresis
BIN: 0b11110110 OCT: 0o366 DEC: 246 HEX: 0xF6 HTML: ö or ö Char: 'ö'
Latin small letter o with slash
BIN: 0b11111000 OCT: 0o370 DEC: 248 HEX: 0xF8 HTML: ø or ø Char: 'ø'
Latin small letter thorn
BIN: 0b11111110 OCT: 0o376 DEC: 254 HEX: 0xFE HTML: þ or þ Char: 'þ'
_ydieresis :: Word8 Source #
Latin small letter y with diaeresis
BIN: 0b11111111 OCT: 0o377 DEC: 255 HEX: 0xFF HTML: ÿ or ÿ Char: 'ÿ'