📌  相关文章
📜  计算字符串中特定字符的数量c#代码示例

📅  最后修改于: 2022-03-11 14:49:23.745000             🧑  作者: Mango

代码示例3
# cCopyusing System;
using System.Linq;

namespace get_first_char_of_string
{
    class Program
    {
        static void Main(string[] args)
        {
            string source = "/once/upon/a/time/";
            int count = source.Split('o').Length - 1; 
            Console.WriteLine(count);
        }
    }
}