GetPrimaryCompositeCharIndex() static private method

static private GetPrimaryCompositeCharIndex ( object chars, int start ) : int
chars object
start int
return int
 private static int GetPrimaryCompositeMapIndex(object o, int cur, int bufferPos)
 {
     if ((Normalization.PropValue(cur) & 64u) != 0u)
     {
         return(0);
     }
     if (Normalization.GetCombiningClass(cur) != 0)
     {
         return(0);
     }
     return(Normalization.GetPrimaryCompositeCharIndex(o, bufferPos));
 }
        public static bool IsNormalized(string source, int type)
        {
            int num = -1;

            for (int i = 0; i < source.Length; i++)
            {
                int num2 = (int)Normalization.GetCombiningClass((int)source[i]);
                if (num2 != 0 && num2 < num)
                {
                    return(false);
                }
                num = num2;
                switch (Normalization.QuickCheck(source[i], type))
                {
                case NormalizationCheck.No:
                    return(false);

                case NormalizationCheck.Maybe:
                {
                    switch (type)
                    {
                    case 0:
                    case 2:
                        return(source == Normalization.Normalize(source, type));
                    }
                    int num3 = i;
                    while (i > 0)
                    {
                        if (Normalization.GetCombiningClass((int)source[i]) == 0)
                        {
                            break;
                        }
                        i--;
                    }
                    while (i < num3)
                    {
                        if (Normalization.GetPrimaryCompositeCharIndex(source, i) != 0)
                        {
                            return(false);
                        }
                        i++;
                    }
                    break;
                }
                }
            }
            return(true);
        }