fromText -package:system-filepath
O(1). A
Builder taking a
Text, satisfying
If the passed in
Text can be parsed as an ASCII representation
of a
UUID, it will be. The hyphens may not be omitted.
O(n). Serialize a strict Unicode
Text value using the
UTF-8 encoding.
O(n). Serialize the lower 8-bits of all characters in the
strict text.
Construct
ShortText from
Text
This is <math> with
text-2 when the
Text is not
sliced. Previously it wasn't because
Text used UTF-16 as its
internal representation.
Deprecated: Use Data.Text.unpack instead
Encode
Text using
UTF-8. Only available when building
with
text-2.0 and newer. Since
Text is backed by a
UTF-8 byte sequence, this does not perform a copy.
Override this to avoid extra
String conversions.
Contructs a new data type instance Like
fromString, but from a
Text input instead of
String.
fromText == fromString . Text.unpack
Create
Builder, containing a given
Text.
>>> :set -XOverloadedStrings
>>> fromText "foo" <> fromText "bar"
"foobar"
For literal strings it is faster to use
fromAddr instead of
fromText.
Create from
Text, linear time.
Create from
Text, linear time.
Reads data from a Text representation.