SHARE
TWEET

Untitled

a guest Dec 14th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static int fromBase26(String number) {
  2.     int s = 0;
  3.     if (number != null && number.length() > 0) {
  4.         s = (number.charAt(0) - 'A');
  5.         for (int i = 1; i < number.length(); i++) {
  6.             s *= 26;
  7.             s += (number.charAt(i) - 'A');
  8.         }
  9.     }
  10.     return s;
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top