:: String -> Text package:hledger

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"
Synonym for error. Used for instances where the program has decided to exit because of invalid user input, or the user pressed quit etc. This function allows error to be reserved for programmer errors.
Raises an error with a printf-specific prefix on the message string.