Trying to build upon the answers in this thread [ Alphanumeric Counter ] to build an endless (for any int) alphanumeric counter without padding.
I want to create a counter that starts at 0 and counts something like this.
0,1,2…Y,Z,10,11,12…1Y,1Z,20,21…ZY,ZZ,100,101…ZZZ,1000,1001 .. infinity (overflow)….
The purpose of the counter is to create short URLS from my database INT id’s. I want to input the id of the row and get a base 36 value from it that i can use as the url.
I’ve made a few attempts but they all seem to end up wrong. I’m getting stuck on how I can test when I should increase the number of characters. i.e. go from Z to 10 or from ZZ to 100.
I think this is what you want: