Portability | portable |
---|---|
Stability | provisional |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Safe Haskell | Safe-Inferred |
Documentation
packedBytes :: Simple Iso [Word8] ByteStringSource
pack
(or unpack
) a list of bytes into a ByteString
pack
x = x^.
packedBytes
unpack
x = x^.
from
packedBytes
bytes :: SimpleIndexedTraversal Int ByteString Word8Source
Traverse each Word8
in a ByteString
bytes
=from
packedBytes
.>
traverseList
anyOf
bytes
(==
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'.
pack
x = x^.
packedChars
unpack
x = x^.
from
packedChars
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
=from
packedChars
.traverse
anyOf
chars
(==
'c') ::ByteString
->Bool