List of utility methods to do String to Long
long | atol(String str) Convert a string to integer. int len = str.length(); long num = 0; int sign = 1; for (int i = 0; i < len; i++) { char c = str.charAt(i); if (c <= ' ') continue; if (c == '-') { ... |
long | convertStringToLong(String string) Converts a string into a long value. long l = 0L; int i = 0; do { char c = string.charAt(i); l *= 37L; if ((c >= 'A') && (c <= 'Z')) { l += '\001' + c - 65; } else if ((c >= 'a') && (c <= 'z')) { ... |