pack package:rio

O(n) Convert a [Word8] into a ByteString. For applications with large numbers of string literals, pack can be a bottleneck. In such cases, consider using unsafePackAddress (GHC only).
O(n) Convert a '[Word8]' into a ByteString.
O(n) Convert a String into a Text. Performs replacement on invalid scalar values, so unpack . pack is not id:
>>> Data.Text.unpack (pack "\55555")
"\65533"
O(n) Convert a String into a Text. Performs replacement on invalid scalar values, so unpack . pack is not id:
>>> Data.Text.Lazy.unpack (Data.Text.Lazy.pack "\55555")
"\65533"
Lifted packCString
A specialised version of zipWith for the common case of a simultaneous map over two ByteStrings, to build a 3rd.
O(n) Converts a ByteString to a [Word8].
O(n) Converts a ByteString to a '[Word8]'.
O(n) Convert a Text into a String.
O(n) Convert a null-terminated modified UTF-8 (but with a standard UTF-8 representation of characters from supplementary planes) string to a Text. Counterpart to unpackCStringUtf8#. No validation is performed, malformed input can lead to memory access violation.