StringBuilder常用方法
Append("str");//在当前字符串后面追加str
Insert(index,"str");//在index位置前面插入str
Remove(startIndex,length);//移除指定位置后面指定长度的子字符串
Replace(cs1,cs2);//替换某个字符或字符串cs1为cs2
ToString();//转换为一个不可变长的字符串string

首页 我的博客
粤ICP备17103704号