public static UnicodeCategory GetUnicodeCategory(char c) { if (IsLatin1(c)) { return(GetLatin1UnicodeCategory(c)); } return(CharUnicodeInfo.InternalGetUnicodeCategory(c)); }
public static UnicodeCategory GetUnicodeCategory(string s, int index) { if (s == null) { throw new ArgumentNullException(nameof(s)); } if (((uint)index) >= ((uint)s.Length)) { throw new ArgumentOutOfRangeException(nameof(index)); } if (IsLatin1(s[index])) { return(GetLatin1UnicodeCategory(s[index])); } return(CharUnicodeInfo.InternalGetUnicodeCategory(s, index)); }