[Haskell] Finding the length of a String in bytes
David House
dmhouse at gmail.com
Thu Jun 22 03:45:06 EDT 2006
Hi there.
I recently needed to add a Content-Length header to my HTTP request
forged with Network.HTTP [1]. However, this needs to be the length of
the body content in bytes, not characters. Without assuming the
characters will all be ASCII, is there an easy way of doing this?
length seems to have the correct results, but I'm uneasy about relying
on this.
Any comments?
--
-David House, dmhouse at gmail.com
More information about the Haskell
mailing list