| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Text.Lazy.Optics
Description
This module provides Isos for converting lazy Text to or from a
String or Builder, and an IxTraversal for traversing the individual
characters of a Text.
If you need to work with both strict and lazy text, Data.Text.Optics provides combinators that support both varieties using a typeclass.
Documentation
utf8 :: Prism' ByteString Text Source #
Encode/Decode a lazy Text to/from lazy ByteString, via UTF-8.
Note: This function does not decode lazily, as it must consume the entire input before deciding whether or not it fails.
>>>LBS.unpack (utf8 # Text.pack "☃")[226,152,131]