Home > > C#的 Split 不支援字串?

C#的 Split 不支援字串?

2012年1月28日星期六

System裡的Char Class的split沒有支援string作為delimiter
http://msdn.microsoft.com/zh-tw/library/b873y76a(VS.80).aspx

 

可以用

System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex("字串flag");
string[] words = regex.Split(fullString);

0 Responses to "C#的 Split 不支援字串?"