Android examples for java.lang:String Convert
Return true if the string is alphanum
public class Main{ /**//from www.ja v a 2 s . c om * 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); } }