escapeConsoleOutputString

Escapes \n, \t and \ in the string. If single is true \t won't be escaped.

string
escapeConsoleOutputString
(
string s
,
bool single = false
)

Parameters

s
Type: string

the string to escape

single
Type: bool

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.

Return Value

Type: string

An escaped string that is safe to print to the console so it can be read line by line

Meta