提供的是一种思路,和具体语言无关。
string test = "good good study day day up"; string r = test.Replace("oo",""); int num = (test.Length - r.Length) /"oo".length; Console.WriteLine(num);
时间: 2024-12-24 18:09:19
提供的是一种思路,和具体语言无关。
string test = "good good study day day up"; string r = test.Replace("oo",""); int num = (test.Length - r.Length) /"oo".length; Console.WriteLine(num);