utilsQuoteString

fnstring utilsQuoteString(string str)

Quotes string as needed according to the rules in rfc2822.

Parameters

strinput string

Returns

an allocated string containing the escaped and quoted (if

needed to be) input string. The decision to quote the string is based on whether or not the input string contains any 'specials' as defined by rfc2822.