예제 #1
0
        public static string Encode(string str)
        {
            if (str == null)
            {
                throw new ArgumentNullException();
            }

            var qp = new QuotedPrintable();

            foreach (var line in Regex.Split(str, "\r\n|\r|\n"))
            {
                qp.NewLine();
                qp.EncodeLine(line);
            }

            return(qp.ToString());
        }
예제 #2
0
        public static string Inline(string str)
        {
            if (str == null)
            {
                throw new ArgumentNullException();
            }

            var qp = new QuotedPrintable();

            qp.inline    = true;
            qp.lineBreak = "?=";

            qp.NewLine();
            qp.EncodeLine(str);
            qp.AppendSuffix();

            return(qp.ToString());
        }