Returns true if a given string {@code s} has digit at position {@code pos}.
@param s input string
@param pos position (0-based)
@return true if input string s has digit at position pos
550582
public static boolean isDigitAt(String s, int pos) {
    return pos > 0 && pos < s.length() && Character.isDigit(s.charAt(pos));
  }
669846
public boolean endsWith(final String str) {
        if (str == null) {
            return false;
        }
        final int len = str.length();
        if (len == 0) {
            return true;
        }
        if (len > size) {
            return false;
        }
        int pos = size - len;
        for (int i = 0; i < len; i++,pos++) {
            if (buffer[pos] != str.charAt(i)) {
                return false;
            }
        }
        return true;
    }
228072
public static boolean isUSPhoneNumber(String s) {
        if (isEmpty(s)) return defaultEmptyOK;
        String normalizedPhone = stripCharsInBag(s, phoneNumberDelimiters);

        return (isInteger(normalizedPhone) && normalizedPhone.length() == digitsInUSPhoneNumber);
    }
1242403
public static boolean isZipCode(String s) {
        if (isEmpty(s)) return defaultEmptyOK;

        String normalizedZip = stripCharsInBag(s, ZipCodeDelimiters);

        return (isInteger(normalizedZip) && ((normalizedZip.length() == digitsInZipCode1) || (normalizedZip.length() == digitsInZipCode2)));
    }
494333
private static boolean isAsciiAlphaNum(String string) {
        for (int i = 0; i < string.length(); i++) {
            final char character = string.charAt(i);
            if (!(character >= 'a' && character <= 'z' ||
                    character >= 'A' && character <= 'Z' ||
                    character >= '0' && character <= '9')) {
                return false;
            }
        }

        return true;
    }
666142
static public boolean containsOnlyDigits(String string0) {
        // are they all digits?
        for (int i = 0; i < string0.length(); i++) {
            if (!Character.isDigit(string0.charAt(i))) {
                return false;
            }
        }
        return true;
    }
913612
private static boolean containsFloatingPointCharacters (String value) {
		for (int i = 0, n = value.length(); i < n; i++) {
			switch (value.charAt(i)) {
			case '.':
			case 'E':
			case 'e':
				return true;
			}
		}
		return false;
	}
1349267
public static boolean isValidJmxPropertyValue(String s) {
        if ((s.indexOf(":") >= 0)
            || (s.indexOf("*") >= 0)
            || (s.indexOf('"') >= 0)
            || (s.indexOf("?") >= 0)
            || (s.indexOf(",") >= 0)
            || (s.indexOf("=") >= 0)) {
            return false;
        } else
            return true;
    }
226090
public static boolean isUSPhoneMainNumber(String s) {
        if (isEmpty(s)) return defaultEmptyOK;
        String normalizedPhone = stripCharsInBag(s, phoneNumberDelimiters);

        return (isInteger(normalizedPhone) && normalizedPhone.length() == digitsInUSPhoneMainNumber);
    }
473784
public static boolean isNumeric(String string) {
        if (string == null || string.length() == 0)
            return false;

        int l = string.length();
        for (int i = 0; i < l; i++) {
            if (!Character.isDigit(string.codePointAt(i)))
                return false;
        }
        return true;
    }
997655
private boolean isToken(String value) {
        int len = value.length();
        for (int i = 0; i < len; i++) {
            char c = value.charAt(i);
            if (c < 0x20 || c >= 0x7f || TSPECIALS.indexOf(c) != -1) {
                return false;
            }
        }

        return true;
    }
379584
public static boolean isJavaIdentifier( String s )
    {
        if (!Character.isJavaIdentifierStart( s.codePointAt( 0 ) )) return false;

        for (int i = 1; i < s.length(); i++)
        {
            if (!Character.isJavaIdentifierPart( s.codePointAt( i ) )) return false;
        }
        return true;
    }
291095
public static boolean isStateCode(String s) {
        if (isEmpty(s)) return defaultEmptyOK;
        return ((USStateCodes.indexOf(s) != -1) && (s.indexOf(USStateCodeDelimiter) == -1));
    }
170844
public Position getPosition(final String pos) {
        final String s = pos.toUpperCase(Locale.US);
        final int len = s.length();
        int status = 0;

        int row = 0;
        int col = 0;
        int n = 0;
        while (n < len) {
            final char c = s.charAt(n);
            switch (status) {
                case BEGIN_LETTER: // opt $
                case BEGIN_DIGIT: // opt $
                    status++;
                    if (c == '$') n++;
                    break;
                case FIRST_LETTER: // mand letter
                    if ('A' <= c && c <= 'Z') {
                        col = c - 'A' + 1;
                        status = PositionUtil.OPT_SECOND_LETTER;
                        n++;
                    } else return null;
                    break;
                case OPT_SECOND_LETTER: // opt letter
                    if ('A' <= c && c <= 'Z') {
                        col = col * ALPHABET_SIZE + c - ORD_A + 1;
                        n++;
                    }
                    status = PositionUtil.BEGIN_DIGIT;
                    break;
                case FIRST_DIGIT: // mand digit
                    if ('0' <= c && c <= '9') {
                        row = c - '0';
                        status = PositionUtil.OPT_DIGIT;
                        n++;
                    } else return null;
                    break;
                case OPT_DIGIT: // opt digit
                    if ('0' <= c && c <= '9') {
                        row = row * 10 + c - '0';
                        n++;
                    } else return null;
                    break;
                default:
                    return null;
            }
        }
        return new Position(this.equalityUtil, this.tableNameUtil, row - 1, col - 1);
    }
204522
public static boolean isLong(String s) {
        if (s == null) {
            return false;
        }
        try {
            Long.parseLong(s.trim());
        } catch (NumberFormatException e) {
            return false;
        }
        return true;
    }
784370
private void scanFraction(int pos) {
        skipIllegalUnderscores();
        if ('0' <= reader.ch && reader.ch <= '9') {
            scanDigits(pos, 10);
        }
        int sp1 = reader.sp;
        if (reader.ch == 'e' || reader.ch == 'E') {
            reader.putChar(true);
            skipIllegalUnderscores();
            if (reader.ch == '+' || reader.ch == '-') {
                reader.putChar(true);
            }
            skipIllegalUnderscores();
            if ('0' <= reader.ch && reader.ch <= '9') {
                scanDigits(pos, 10);
                return;
            }
            lexError(pos, "malformed.fp.lit");
            reader.sp = sp1;
        }
    }
300440
public static boolean isInteger(String s) {
        if (isEmpty(s)) return defaultEmptyOK;

        // Search through string's characters one by one
        // until we find a non-numeric character.
        // When we do, return false; if we don't, return true.
        for (int i = 0; i < s.length(); i++) {
            // Check that current character is number.
            char c = s.charAt(i);

            if (!isDigit(c)) return false;
        }

        // All characters are numbers.
        return true;
    }