| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
PlutusCore.Flat.Instances.Text
Contents
Description
Flat instances for the text library
Documentation
The desired text encoding can be explicitly specified using the wrappers UTF8Text and UTF16Text.
The default encoding is UTF8:
>>>tst (UTF8Text $ T.pack "日日日") == tst (T.pack "日日日")True
A wrapper to encode/decode Text as UTF8
Instances
| Show UTF8Text Source # | |
| Eq UTF8Text Source # | |
| Ord UTF8Text Source # | |
Defined in PlutusCore.Flat.Instances.Text | |
| Flat UTF8Text Source # | |
>>>tt (UTF16Text $ T.pack "aaa")(True,[1,6,97,0,97,0,97,0,0])
>>>tt (UTF16Text $ T.pack "𐍈𐍈𐍈")(True,[1,12,0,216,72,223,0,216,72,223,0,216,72,223,0])
A wrapper to encode/decode Text as UTF16
Instances
| Show UTF16Text Source # | |
| Eq UTF16Text Source # | |
| Ord UTF16Text Source # | |
Defined in PlutusCore.Flat.Instances.Text | |
| Flat UTF16Text Source # | |
Orphan instances
| Flat Text Source # | Text (and Data.Text.Lazy) is encoded as a byte aligned array of bytes corresponding to its UTF8 encoding.
Strict and Lazy Text have the same encoding:
|
| Flat Text Source # | |