happstack-util-0.4.1: Web frameworkSource codeContentsIndex
Happstack.Util.ByteStringCompat
Description
Compatiblity for ByteStrings
Synopsis
breakChar :: Char -> ByteString -> (ByteString, ByteString)
breakCharEnd :: Char -> ByteString -> (ByteString, ByteString)
dropSpace :: ByteString -> ByteString
dropSpaceEnd :: ByteString -> ByteString
rechunkLazy :: ByteString -> ByteString
Documentation
breakChar :: Char -> ByteString -> (ByteString, ByteString)Source
Semantically equivalent to break on strings
breakCharEnd :: Char -> ByteString -> (ByteString, ByteString)Source

breakCharEnd behaves like breakChar, but from the end of the ByteString.

 breakCharEnd ('b') (pack "aabbcc") == ("aab","cc")

and the following are equivalent:

 breakCharEnd 'c' "abcdef"
 let (x,y) = break (=='c') (reverse "abcdef")
 in (reverse (drop 1 y), reverse x)
dropSpace :: ByteString -> ByteStringSource
Drops leading spaces in the ByteString
dropSpaceEnd :: ByteString -> ByteStringSource
Drops trailing spaces in the ByteString
rechunkLazy :: ByteString -> ByteStringSource
Chunk a lazy bytestring into reasonable chunks - is id from outside. This is useful to make bytestring chunks reasonable sized for e.g. compression.
Produced by Haddock version 2.5.0