split 分割字符串

string str="aaaa^bbbb^cccc^dddd";
   string [] mystr=str.Split('^');
   foreach (string i in mystr)
   {
    Response .Write (i.ToString()+"<br>");
   }
输出为:
aaaa
bbbb
cccc
dddd

Response .Write (mystr.Length.ToString()); 
输出为:4

你可能感兴趣的:(split)