title: How to convert a base 10 number to alphabetic like ordered list in HTML
body: <p>I want to convert a integer to alphabetic equivalent like ordered list in HTML.</p>
  
  <pre><code>&lt;ol type="a"&gt;
  </code></pre>
  
  <p>I tried to convert a base 10 number to a base 26 with a-z digits. 
  <br>
  But that's not what I wanted.</p>
  
  <pre><code>IN     WANT        GET      
  -----------------------
  1   =&gt;  a       &lt;=  a
  2   =&gt;  b       &lt;=  b
  3   =&gt;  c       &lt;=  c
  4   =&gt;  d       &lt;=  d
  5   =&gt;  e       &lt;=  e
  6   =&gt;  f       &lt;=  f
  7   =&gt;  g       &lt;=  g
  8   =&gt;  h       &lt;=  h
  9   =&gt;  i       &lt;=  i
  10  =&gt;  j       &lt;=  j
  11  =&gt;  k       &lt;=  k
  12  =&gt;  l       &lt;=  l
  13  =&gt;  m       &lt;=  m
  14  =&gt;  n       &lt;=  n
  15  =&gt;  o       &lt;=  o
  16  =&gt;  p       &lt;=  p
  17  =&gt;  q       &lt;=  q
  18  =&gt;  r       &lt;=  r
  19  =&gt;  s       &lt;=  s
  20  =&gt;  t       &lt;=  t
  21  =&gt;  u       &lt;=  u
  22  =&gt;  v       &lt;=  v
  23  =&gt;  w       &lt;=  w
  24  =&gt;  x       &lt;=  x
  25  =&gt;  y       &lt;=  y
  26  =&gt;  z       &lt;=  az
  27  =&gt;  aa      &lt;=  aa
  28  =&gt;  ab      &lt;=  ab
  29  =&gt;  ac      &lt;=  ac
  </code></pre>
  
  <hr>
  
  <pre><code>private final static char[] digits = {
  '0' , 'a' , 'b' , 'c' , 'd' , 'e' , 'f' , 
  'g' , 'h' , 'i' , 'j' , 'k' , 'l' , 
  'm' , 'n' , 'o' , 'p' , 'q' , 'r' , 
  's' , 't' , 'u' , 'v' , 'w' , 'x' , 'y' , 'z'
  };
  
  private static String numberToAlphaNumeric(long i, int radix) {
  
      char[] buf = new char[65];
      int charPos = 64;
      boolean negative = (i &lt; 0);
      if (!negative) {
          i = -i;
      }
      while (i &lt;= -radix) {
          buf[charPos--] = digits[(int)(-(i % radix))];
          i = i / radix;
      }
      buf[charPos] = digits[(int)(-i)];
      if (negative) { 
          buf[--charPos] = '-';
      }
      return new String(buf, charPos, (65 - charPos));
  }
  
  public static String numberToAlphaNumeric(long number) {
      ArrayList&lt;String&gt; list = new ArrayList&lt;String&gt;();
      for( int j = 0; list.size() != number; j++ ) {
          String alpha = numberToAlphaNumeric( j, digits.length );
          if(!alpha.contains( "0" )) {
              list.add( alpha );
          }
      }
      return list.get( list.size()-1 );
  }
  </code></pre>
  
  <p>My 2nd Idea:</p>
  
  <p>If I extend a new leading symbol to the digits and convert my number to a base 27 number, 
  I have the new Symbol in every carry over which is wrong and I can filter these out.</p>
  
  <p>This is very inefficient and ugly, but I have no more ideas. What is the common way? </p>