| Portability | non-portable |
|---|---|
| Stability | experimental |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Safe Haskell | None |
Data.ByteString.Lazy.Lens
Description
Lenses for lazy bytestrings
Documentation
packedBytes :: Simple Iso [Word8] ByteStringSource
pack (or unpack) a list of bytes into a ByteString
packx = x^.packedBytes
unpackx = x^.frompackedBytes
bytes :: SimpleIndexedTraversal Int ByteString Word8Source
Traverse the individual bytes in a ByteString
bytes=frompackedBytes.itraversed
anyOfbytes(==0x80) ::ByteString->Bool
packedChars :: Simple Iso String ByteStringSource
pack (or unpack) a list of characters into a ByteString
When writing back to the ByteString it is assumed that every Char
lies between '\x00' and '\xff'.
packx = x^.packedChars
unpackx = x^.frompackedChars
chars :: SimpleIndexedTraversal Int ByteString CharSource
Traverse the individual bytes in a ByteString as characters.
When writing back to the ByteString it is assumed that every Char
lies between '\x00' and '\xff'.
chars=frompackedChars.>itraversed
anyOfchars(=='c') ::ByteString->Bool