[Haskell-cafe] Converting [Word8] to String
Joel Reymont
joelr1 at gmail.com
Sun Oct 2 06:52:22 EDT 2005
Folks,
How do I convert a list of bytes to a string?
Cale has suggested a neat way of parsing binary packets in this thread:
http://www.mail-archive.com/haskell-cafe@haskell.org/msg09413.html
and I'm trying to create a packet reader for a Pascal-style string
where the length is the first byte and the list of characters follows.
I understand that I can take the first X bytes of the byte list but
how do I make this into a string?
I'll probably use fast packed strings to read from the socket handle
and will unpack the fps into a list of bytes for parsing.
Thanks, Joel
--
http://wagerlabs.com/
More information about the Haskell-Cafe
mailing list