Copyright | (c) 2016 Stephen Diehl (c) 2016-2018 Serokell (c) 2018-2020 Kowainik |
---|---|
License | MIT |
Maintainer | Kowainik <xrom.xkov@gmail.com> |
Stability | Stable |
Portability | Portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Type classes for conversion between different string representations.
The table below represents the relude
concept of conversion between the following types:
From \ To | Text | String | ByteString | LText | LByteString | ShortByteString |
---|---|---|---|---|---|---|
Text | ~ | toString | encodeUtf8 | 'toLazy'/'toLText' | encodeUtf8 | encodeUtf8 |
String | toText | ~ | encodeUtf8 | toLText | encodeUtf8 | encodeUtf8 |
ByteString | decodeUtf8 | decodeUtf8 | ~ | decodeUtf8 | toLazy | toShort |
LText | 'toStrict'/'toText' | toString | encodeUtf8 | ~ | encodeUtf8 | encodeUtf8 |
LByteString | decodeUtf8 | decodeUtf8 | toStrict | decodeUtf8 | ~ | |
ShortByteString | decodeUtf8 | decodeUtf8 | fromShort | decodeUtf8 |
| ~ |
Synopsis
- module Relude.String.Reexport
- module Relude.String.Conversion
Documentation
module Relude.String.Reexport
Reexport data types and functions to work with Text
, ByteString
,
ShortByteString
.
module Relude.String.Conversion
Conversion functions between Text
, String
, ByteString
.
Also some read|show helper functions.