This patch fixes the library to work with bases other than 62. The main problem was that the character 0 had a special meaning as the first (lowest) character, which is not true for every base. For example, in base 95 (which you can get with this snippet) the ` (space) is the lowest character. Therefore, we should infer the 'zero' from thedigits` parameter.
This PR also contains additional tests for the base 95 case.
This patch fixes the library to work with bases other than 62. The main problem was that the character
0
had a special meaning as the first (lowest) character, which is not true for every base. For example, in base 95 (which you can get with this snippet) the` (space) is the lowest character. Therefore, we should infer the 'zero' from the
digits` parameter.This PR also contains additional tests for the base 95 case.