C#将字符串转rtf值

字符串转rtf值

//字符串转rtf
        public string str2Rtf(string s)
        {
            string rtfFormattedString = "";
            RichTextBox richTextBox = new RichTextBox();
            richTextBox.Text = s;
            rtfFormattedString = richTextBox.Rtf;
            return rtfFormattedString;
        }
posted @ 2022-06-30 17:16  码农阿亮  阅读(151)  评论(0编辑  收藏  举报