Android String to Number Convert isLetterNumeric(String s)

Here you can find the source of isLetterNumeric(String s)

Description

Return true if the string is alphanum.

License

Open Source License

Declaration

public static boolean isLetterNumeric(String s) 

Method Source Code

//package com.java2s;

public class Main {
    /**//  w w w. ja v a2 s  . co m
     * Return true if the string is alphanum.
     * <code>{letter digit }</code>
     * 
     **/
    public static boolean isLetterNumeric(String s) {
        int i = 0, len = s.length();
        while (i < len
                && (Character.isLowerCase(s.charAt(i))
                        || Character.isUpperCase(s.charAt(i)) || Character
                            .isDigit(s.charAt(i)))) {
            i++;
        }
        return (i >= len);
    }
}

Related

  1. isNumeric(String str)
  2. isNumeric(String str)
  3. isNumeric(String str)
  4. isNumeric(String str)
  5. isNumeric(String string)
  6. isNumericOnly(String pString)
  7. isNumeric(String str)
  8. containsNonNumericCharacters(String rawInput)
  9. isNumber(String str)