c#如何判断字符串是否含中文

如代码:

    static bool ContainChinese(string input)
    {
        string pattern = "[\u4e00-\u9fbb]";
        return Regex.IsMatch(input, pattern);
    }

 

posted @ 2017-07-27 15:36  孤独の巡礼  阅读(6610)  评论(0编辑  收藏  举报