haskell / text

Haskell library for space- and time-efficient operations over Unicode text.

Home Page:http://hackage.haskell.org/package/text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add unsafe decoding functions

oberblastmeister opened this issue · comments

unsafeDecodeUtf8 :: ByteString -> Text
unsafeDecodeUtf8ByteArray :: ByteArray -> Int -> Int -> Text

These functions do not check if the input is valid utf8. unsafeDecodeUtf8ByteArray does not check the bounds either.

There is a maintenance price to expand API with all helpers possible, I'm reluctant to go this route.