日期:2014-05-18 浏览次数:21358 次
string s = "xxxxxx,xxxxxx,xxxxxxxx。xxxxxxxx。xxxxxxxxx;xxxxx!xxxxxx!"; List<int> position = new List<int>(); int index = -1; while ((index = s.IndexOf(',', index + 1)) >= 0) { position.Add(index); }