GetUnicodeCategory() public static method

public static GetUnicodeCategory ( String s, int index ) : UnicodeCategory
s String
index int
return UnicodeCategory
        // Token: 0x06002CCD RID: 11469 RVA: 0x000AB254 File Offset: 0x000A9454
        internal static bool IsWhiteSpace(char c)
        {
            UnicodeCategory unicodeCategory = CharUnicodeInfo.GetUnicodeCategory(c);

            return(unicodeCategory - UnicodeCategory.SpaceSeparator <= 2);
        }
        // Token: 0x06002CCC RID: 11468 RVA: 0x000AB234 File Offset: 0x000A9434
        internal static bool IsWhiteSpace(string s, int index)
        {
            UnicodeCategory unicodeCategory = CharUnicodeInfo.GetUnicodeCategory(s, index);

            return(unicodeCategory - UnicodeCategory.SpaceSeparator <= 2);
        }
Esempio n. 3
0
 public static UnicodeCategory GetUnicodeCategory(char c)
 {
     return(CharUnicodeInfo.GetUnicodeCategory(c));
 }
Esempio n. 4
0
 public static UnicodeCategory GetUnicodeCategory(string s, int index)
 {
     return(CharUnicodeInfo.GetUnicodeCategory(s, index));
 }
Esempio n. 5
0
 private static void VerifyNativeDigits(string[] nativeDig, string propertyName)
 {
     if (nativeDig == null)
     {
         throw new ArgumentNullException(propertyName, Environment.GetResourceString("ArgumentNull_Array"));
     }
     if (nativeDig.Length != 10)
     {
         throw new ArgumentException(Environment.GetResourceString("Argument_InvalidNativeDigitCount"), propertyName);
     }
     for (int index = 0; index < nativeDig.Length; ++index)
     {
         if (nativeDig[index] == null)
         {
             throw new ArgumentNullException(propertyName, Environment.GetResourceString("ArgumentNull_ArrayValue"));
         }
         if (nativeDig[index].Length != 1)
         {
             if (nativeDig[index].Length != 2)
             {
                 throw new ArgumentException(Environment.GetResourceString("Argument_InvalidNativeDigitValue"), propertyName);
             }
             if (!char.IsSurrogatePair(nativeDig[index][0], nativeDig[index][1]))
             {
                 throw new ArgumentException(Environment.GetResourceString("Argument_InvalidNativeDigitValue"), propertyName);
             }
         }
         if (CharUnicodeInfo.GetDecimalDigitValue(nativeDig[index], 0) != index && CharUnicodeInfo.GetUnicodeCategory(nativeDig[index], 0) != UnicodeCategory.PrivateUse)
         {
             throw new ArgumentException(Environment.GetResourceString("Argument_InvalidNativeDigitValue"), propertyName);
         }
     }
 }