首页
Java
登录
6mi
u
盘
搜
搜 索
Java
判断字符串中是否包含中文
判断字符串中是否包含中文
xiaoxiao
2021-02-28
80
/// <summary> /// 判断字符串中是否包含中文 /// </summary> /// <param name="str">需要判断的字符串</param> /// <returns>判断结果</returns> public static bool HasChinese( this string str) { return Regex.IsMatch(str, @"[\u4e00-\u9fa5]" ); }
转载请注明原文地址: https://www.6miu.com/read-46972.html
技术
最新回复
(
0
)