1. 4
  1.  

  2. 4

    What’s main uses for this?

    1. 4

      i don’t know. I just didn’t have anything better to do.

      1. 2

        Gotcha haha.

        1. 2

          That’s reason enough!

      2. 4

        Why not just use the POSIX method l64a?

        http://pubs.opengroup.org/onlinepubs/9699919799/functions/a64l.html

        Or here is something similar with Python, uses 0-9A-Za-z-_. radix 64:

        def strb(val, base=10):
           import string as cf
           dh = cf.digits + cf.ascii_uppercase + cf.ascii_lowercase + '-_'
           ko = ''
           while val:
              ko = dh[val % base] + ko
              val //= base
           return ko
        

        YouTube uses this for their video_ids.

        1. 1

          Because I didn’t search for similar methods.