Exemple #1
0
 /// <summary>
 /// 是否包含中文字符
 /// </summary>
 /// <param name="str">字符串</param>
 public static bool ContainsChineseCharacters(string str) => !string.IsNullOrWhiteSpace(str) && RegexJudgment.IsMatch(str, "[\u4e00-\u9fa5]+");
Exemple #2
0
 /// <summary>
 /// 是否包含数字字符
 /// </summary>
 /// <param name="str">字符串</param>
 public static bool ContainsNumber(string str) =>
 !string.IsNullOrWhiteSpace(str) && RegexJudgment.IsMatch(str, "[0-9]+");