title: Map alphabetic sequence to integer
body: <p>I want to implement an alphabetic code which maps to an integer.</p>
  
  <p>For example:</p>
  
  <pre><code>A = 1
  B = 2
  C = 3
  ...
  Z = 26
  AA = 27
  AB = 28
  ...
  BA = 53
  ...
  ZZ = 702
  </code></pre>
  
  <p>What the best way to do this mapping so that I can easily convert from an alphabetic code into a number and vice versa?</p>