the string to escape
if true, s is already tab separated and only needs to be escape new lines. Otherwise s is treated as one value that is meant to be printed tab separated with other values.
An escaped string that is safe to print to the console so it can be read line by line
Escapes \n, \t and \ in the string. If single is true \t won't be escaped.