关于空间Common中Utils类中分割字符串方法SplitString的Bug
关于空间Common中Utils类中分割字符串方法SplitString的Bug
测试:
string tempStr="a|b|c";
string[] arrTemp=Utlis.SplitString(tempStr,"|");
Response.Write(arrTemp.Length + "<br/>");
Response.Write(" ====================================== <br/>");
for(inti=0;inti<arrTemp.Length;inti++)
{
Response.Write(arrTemp[inti]);
Response.Write("<br/>");
}
以上为例,按理说分割出来的数组大小应该为3,事实上却为8。
正式版应该有改正过来吧。
Regex.Split(strContent,@strSplit.Replace("|","\\|"));
请大家多多指教!