字元/字串切割

摘要:字元/字串切割

程式新手,還是要多多記錄一下 ^____^

 

1 String str="a,b,c";
2 String str1="a##b##C";
3
4 //字元切割
5 String[] s=str.Split(',');
6
7 //字串切割
8 String[] s1=System.Text.RegularExpressions.Regex.Split(str1,"##")