zenacy-html-2.1.0: A standard compliant HTML parsing library
Safe HaskellSafe-Inferred
LanguageHaskell2010

Zenacy.HTML.Internal.BS

Description

Convenience wrappers and utilities for byte strings.

Synopsis

Documentation

type BS = ByteString Source #

A type abbreviation for a byte string.

Word functions.

bsEmpty :: BS Source #

An empty byte string.

bsOnly :: Word8 -> BS Source #

A byte string with only one character.

bsLen :: BS -> Int Source #

Gets the length of a byte string.

bsPack :: [Word8] -> BS Source #

Converts a list of characters to a byte string.

bsUnpack :: BS -> [Word8] Source #

Converts a byte string to a list of characters.

bsConcat :: [BS] -> BS Source #

Concatenates byte strings into one.

bsIndex :: BS -> Int -> Word8 Source #

Gets the character at an index in a byte string.

bsElemIndex :: Word8 -> BS -> Maybe Int Source #

Gets the index of a character in a byte string.

bsLower :: BS -> BS Source #

Converts a bytestring to lowercase.

bsPrefixCI :: BS -> BS -> Bool Source #

Determines if a bytestring is a case-insensitive prefix of another.

bsPart :: Int -> Int -> BS -> BS Source #

Selects a substring for a byte string.

bsLast :: BS -> Maybe Word8 Source #

Returns the last word of a bytestring.

bsTake :: Int -> BS -> BS Source #

Takes characters from a byte string.

bsDrop :: Int -> BS -> BS Source #

Drops characters from a byte string.

bsUncons :: BS -> Maybe (Word8, BS) Source #

Removes a character from the end of a byte string.

Character functions.

bcPack :: String -> BS Source #

Converts a string to a byte string.

bcUnpack :: BS -> String Source #

Converts a bytestring to a string.