/** * checks if a string contains only digits, i.e. * no non-number char in string, even no whitespace. * * @param str the string to check * * @return true if no illegal char detected, false otherwise */ public static boolean isAllDigits(String str) { return isAllDigits(str, false); }
(slen <= 2 && StringHelper.isAllDigits(str)) || "sSmMhHdDwWyY".indexOf(str.charAt(slen-1)) >= 0) {
(slen <= 2 && StringHelper.isAllDigits(str)) || "sSmMhHdDwWyY".indexOf(str.charAt(slen-1)) >= 0)) {