| 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 :: Iso' [Word8] ByteStringSource
pack (or unpack) a list of bytes into a ByteString.
packx = x^.packedBytes
unpackx = x^.frompackedBytes
bytes :: IndexedTraversal' Int64 ByteString Word8Source
Traverse the individual bytes in a ByteString.
bytes=frompackedBytes.itraversed
anyOfbytes(==0x80) ::ByteString->Bool
packedChars :: 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 :: IndexedTraversal' Int64 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