// ---------------- DecodeHeaderString_QuotedOnly -------------------------- // decode the header string. If it is quoted, dequote it. Otherwise, return as is. public static string DecodeHeaderString_QuotedOnly(string InString) { QuoteEncapsulation qem = QuoteEncapsulation.Escape; string results = null; if (Stringer.IsQuoted(InString, qem) == true) { results = Stringer.Dequote(InString, qem); } else { results = InString; } return(results); }
// ---------------- DecodeHeaderString_QuotedEncodedEither -------------------------- // decode the string that can be either quoted or contain encoded-words. public static string DecodeHeaderString_QuotedEncodedEither(string InString) { string results = null; QuoteEncapsulation qem = QuoteEncapsulation.Escape; if (Stringer.IsQuoted(InString, qem) == true) { results = DecodeHeaderString_QuotedOnly(InString); } else { results = DecodeHeaderString_EncodedOnly(InString); } return(results); }