I'm making a tool for optimizing script and now I want to compress all names in it to the minimum.
I got the function started for it, but it somehow bugs and stops after length 2 is exceeded.
Is there an easier way to do this? I just need a pattern that generates a String starting from a -> z then aa -> az ba -> bz and so on.

```
    public String getToken() {
    String result = ""; int i = 0;
    while(i < length){
        result = result + charmap.substring(positions[i], positions[i]+1);
        positions[length]++;
        if (positions[current] >= charmap.length()){
            positions[current] = 0;
            if ( current < 1 ) {
                current++;length++;
            }else{
                int i2 = current-1;
                while( i2 > -1 ){
                    positions[i2]++;
                    if(positions[i2] < charmap.length()){
                        break;
                    }else if( i2 > 0 ){
                        positions[i2] = 0;
                    }else{
                        positions[i2] = 0;
                        length++;current++;
                    }
                    i2--;

                }

            }

        }
        i++;
    }
    return result;
}

```

UNLIKE THE OTHER QUESTIONS!! I dont just want to increase an integer, the length increases to much.