| Portability | non-portable |
|---|---|
| Stability | experimental |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Safe Haskell | None |
Data.ByteString.Strict.Lens
Description
Documentation
packedBytes :: Iso' [Word8] ByteStringSource
pack (or unpack) a list of bytes into a ByteString
packx = x^.packedBytes
unpackx = x^.frompackedBytes
bytes :: IndexedTraversal' Int ByteString Word8Source
Traverse each Word8 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' 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.traverse
anyOfchars(=='c') ::ByteString->Bool