本帖最后由 KingMan 于 2019-4-3 17:20 编辑
int iParagraphs = textControl1.Paragraphs.Count;
for (int i = iParagraphs; i >= 1; i--)
{
String sText = textControl1.Paragraphs.Text.Replace("\r\n", "").Replace(" ", "").Replace(" ", "");
if (sText.Length > 0)
break;
textControl1.Paragraphs.Select();
textControl1.Selection.Text = "";
}
我想清除空的段落,但是好像没有用,应该怎么处理。即清空空行或空换行。
|
|