RosettaCodeData/Task/String-length/Haskell/string-length-1.hs
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

11 lines
239 B
Haskell

import Data.Encoding
import Data.ByteString as B
strUTF8 :: ByteString
strUTF8 = encode UTF8 "Hello World!"
strUTF32 :: ByteString
strUTF32 = encode UTF32 "Hello World!"
strlenUTF8 = B.length strUTF8
strlenUTF32 = B.length strUTF32