private static bool HasOnlyHebrewChars(string word) { if (word.Length < 1) { return(false); } if (int.TryParse(word, out _)) { return(false); } var regex = new Regex(@"[" + HebrewConsonantData.ValidHebrewCharSet() + "]"); var match = regex.Match(word ?? throw new ArgumentNullException(nameof(word))); return(match.Success); }
private static bool IsHebrewChar(char c) => HebrewConsonantData.ValidHebrewCharSet().Contains(c);