:: String -> ByteString

O(n) Convert a String into a ByteString For applications with large numbers of string literals, pack can be a bottleneck.
Converts a Haskell string into a UTF8 encoded bytestring.
Encode String to UTF8-encoded ByteString Code-points in the U+D800-U+DFFF range will be encoded as the replacement character (i.e. U+FFFD).
Variant of toUTF8BS for lazy ByteStrings
Encode a String into a ByteString.
Encode String to ByteString using UTF-8.
Convert an UTF8-encoded String to a ByteString.
Parse a hexadecimal hash representation into its binary form suitable for encoding with printSHA256.
>>> packHex "48656c6c6f2c20776f726c642e"
"Hello, world."
Leading zeros can be omitted, i.e. it's unnecessary to pad the input to an even number of bytes:
>>> packHex "0"
"\NUL"
Convert hex strings to bytestrings, for example:
"3adf91c0" ==> B.pack [0x3a, 0xdf, 0x91, 0xc0]
Strings of odd length will cause an exception as will non-hex characters such as '0x'.
Converts the given String into a UTF-8 encoded ByteString.
Encode a String to a UTF-8 ByteString
Raises an error with a printf-specific prefix on the message string.
Deprecated: error appends the call stack now
Raises a SizeOverflowException, with a message using the given function name.