GeometryGym.Ifc.ParserIfc.cv_from_64 C# (CSharp) Méthode

cv_from_64() static private méthode

The reverse function to calculate the number from the characters
static private cv_from_64 ( char str, int start, int len ) : uint
str char The char array to convert from
start int Position in array to start read
len int The length to read
Résultat uint
        static uint cv_from_64(char[] str, int start, int len)
        {
            int i, j, index;
            uint res = 0;
            Debug.Assert(len <= 4);

            for (i = 0; i < len; i++)
            {
                index = -1;
                for (j = 0; j < 64; j++)
                {
                    if (base64Chars[j] == str[start + i])
                    {
                        index = j;
                        break;
                    }
                }
                Debug.Assert(index >= 0);
                res = res * 64 + ((uint)index);
            }
            return res;
        }