fromString -package:os-string

O(1). A Builder taking a String, satisfying Performs replacement on invalid scalar values:
>>> fromString "\55555"
"\65533"
Converts a Haskell string into a UTF8 encoded bytestring.
Converts a Haskell string into a UTF8 encoded bytestring.
Converts a Haskell string into a UTF8 encoded string. Complexity: linear.
If the passed in String can be parsed as a UUID, it will be. The hyphens may not be omitted. Example:
>>> fromString "c2cc10e1-57d6-4b6f-9899-38d972112d8c"
Just c2cc10e1-57d6-4b6f-9899-38d972112d8c
Hex digits may be upper or lower-case.
O(n). Serialize a Unicode String using the UTF-8 encoding.
O(n). Serialize the lower 8-bits of all characters of a string
Construct/pack from String
>>> fromString []
""
>>> fromString ['a','b','c']
"abc"
>>> fromString ['\55295','\55296','\57343','\57344'] -- U+D7FF U+D800 U+DFFF U+E000
"\55295\65533\65533\57344"
Note: This function is total because it replaces the (invalid) code-points U+D800 through U+DFFF with the replacement character U+FFFD.
Convert a String consisting of only characters in the ASCII block to a byte sequence. Any character with a codepoint above U+007F is replaced by U+0000.
Convert a String consisting of only characters representable by ISO-8859-1. These are encoded with ISO-8859-1. Any character with a codepoint above U+00FF is replaced by an unspecified byte.
Construct a CharIterator from a Unicode string.
See fromText.
Encode String to ByteString using UTF-8.
Encode a Unicode string to Path using strict UTF-8 encoding on Posix. On Posix it may fail if the stream contains null characters. TBD: Use UTF16LE on Windows.
A shorthand for maybeParsed . parseString
fromString qm sep text parses text into a spreadsheet, using the quotation character qm and the separator character sep.
>>> Spreadsheet.fromString '"' '\t' "\"hello\"\t\"world\"\n\"end\"\n"
Exceptional {exception = Nothing, result = [["hello","world"],["end"]]}

>>> Spreadsheet.fromString '"' ',' "\"hello,world\",\"really\"\n\"end\"\n"
Exceptional {exception = Nothing, result = [["hello,world","really"],["end"]]}

>>> Spreadsheet.fromString '"' ';' "\"hello \"\"world\"\"\"\n\"really\"\n"
Exceptional {exception = Nothing, result = [["hello \"world\""],["really"]]}

>>> Spreadsheet.fromString '"' ',' "\"hello\nworld\"\n"
Exceptional {exception = Nothing, result = [["hello\nworld"]]}
MF.fromString parses a Text value in MetaFont syntax, and attempts to return a TrailLike. Only a subset of Metafont is supported; see the tutorial for details.