标签:
提供的是一种思路,和具体语言无关。
string test = "good good study day day up"; string r = test.Replace("oo",""); int num = (test.Length - r.Length) /"oo".length; Console.WriteLine(num);
C#查找子串在原串中出现次数
原文地址:http://www.cnblogs.com/hxsyl/p/4570771.html