| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
RIO.Text
Description
Strict Text. Import as:
import qualified RIO.Text as T
- module Data.Text
- encodeUtf8 :: Text -> ByteString
- decodeUtf8With :: OnDecodeError -> ByteString -> Text
- decodeUtf8' :: ByteString -> Either UnicodeException Text
- lenientDecode :: OnDecodeError
Documentation
module Data.Text
encodeUtf8 :: Text -> ByteString #
Encode text using UTF-8 encoding.
decodeUtf8With :: OnDecodeError -> ByteString -> Text #
Decode a ByteString containing UTF-8 encoded text.
decodeUtf8' :: ByteString -> Either UnicodeException Text #
Decode a ByteString containing UTF-8 encoded text.
If the input contains any invalid UTF-8 data, the relevant exception will be returned, otherwise the decoded text.
lenientDecode :: OnDecodeError #
Replace an invalid input byte with the Unicode replacement character U+FFFD.