CSharpMinifier.MinIdGenerator.Next C# (CSharp) Method

Next() public method

public Next ( ) : string
return string
        public override string Next()
        {
            int i = _indexes.Count - 1;
            bool inc;
            do
            {
                if (i == -1)
                {
                    _indexes.Add(0);
                    break;
                }
                _indexes[i] = _indexes[i] + 1;
                inc = false;
                if ((i == 0 && _indexes[i] >= Chars0.Length) || _indexes[i] >= CharsN.Length)
                {
                    _indexes[i--] = 0;
                    inc = true;
                }
            }
            while (inc);

            StringBuilder result = new StringBuilder(_indexes.Count);
            for (int j = 0; j < _indexes.Count; j++)
                result.Append(j == 0 ? Chars0[_indexes[j]] : CharsN[_indexes[j]]);

            CurrentCombination = result.ToString();
            CurrentCombinationNumber++;

            return Prefix + CurrentCombination + Postfix;
        }