check the given char to be a digit or alphabetic
@param c
@return true if this is a digit an upper case char or a lowercase char
343071
public static boolean isDigitsOrAlphabetic(char c) {
        int i = (int)c;
        return digits.include(i) || uppers.include(i) || lowers.include(i);
    }
214162
private static boolean hasUnsafeChars(String s) {
        for (int i = 0; i < s.length(); ++i) {
            char c = s.charAt(i);
            if (Character.isLetter(c) || c == '.')
                continue;
            else
                return true;
        }
        return false;
    }
1087899
protected boolean accept(char c){

		// Whitespace
		if(c == '\t' || c == '\n' || c == '\f' || c == '\r' || c == ' '){
			return true;
		}

		// ASCII letters, numbers and control characters
		if(c >= '\u0021' && c <= '\u007f'){
			return true;
		}

		// Latin-1 supplement letters
		if((c >= '\u00c0' && c <= '\u00d6') || (c >= '\u00d8' && c <= '\u00f6') || (c >= '\u00f8' && c <= '\u00ff')){
			return true;
		}

		// Unicode letters
		if((c >= '\u0100' && c <= '\u1fff') || (c == '\u20ac' || c == '\u2122')){
			return true;
		}

		return false;
	}
497524
protected static boolean isNCNamePart(char c) {
        return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || Character.isDigit(c) || c == '-' || c == '_' || c == '.');
    }
53414
public static boolean isEnglish(char c){
        //大部分字符在这个范围
        if(c > 'z' && c < 'Ａ'){
            return false;
        }
        if(c < 'A'){
            return false;
        }
        if(c > 'Z' && c < 'a'){
            return false;
        }
        if(c > 'Ｚ' && c < 'ａ'){
            return false;
        }
        if(c > 'ｚ'){
            return false;
        }
        return true;
    }
79393
public static void checkCharacter(char c) throws IOException {
		if(
			(c < 0x20 || c > 0xD7FF) // common case first
			&& c != 0x9
			&& c != 0xA
			&& c != 0xD
			&& (c < 0xE000 || c > 0xFFFD)
			// high and low surrogates
			//&& (c < 0x10000 || c > 0x10FFFF)
			&& (c < Character.MIN_HIGH_SURROGATE || c > Character.MAX_LOW_SURROGATE)

		) throw new IOException(ApplicationResources.accessor.getMessage("XhtmlValidator.invalidCharacter", Integer.toHexString(c)));
	}
1253114
public static boolean isDigitsOnly(String s) {
        if (isEmpty(s)) return false;
        String rslt = s.trim();
        if (isEmpty(rslt)) return false;
        for (int i = 0; i < rslt.length(); i++) {
            char ch = rslt.charAt(i);
            if (!Character.isDigit(ch)) return false;
        }
        return true;
    }
58810
private static boolean isNumericSuffix(char c)
  {
    if(c == 'L') return true;
    if(c == 'F') return true;
    if(c == 'D') return true;
    if(c == 'l') return true;
    if(c == 'f') return true;
    if(c == 'd') return true;
    return false;
  }
29837
private static boolean isNameCase(String str) {
    if (str.length() < 2) {
      return false;
    }
    if (!(Character.isUpperCase(str.charAt(0)) || Character.isTitleCase(str.charAt(0)))) {
      return false;
    }
    for (int i = 1; i < str.length(); i++) {
      if (Character.isUpperCase(str.charAt(i))) {
        return false;
      }
    }
    return true;
  }
177156
private static int decodeHex(final char c) {
    if (c < '0') {
      return INVALID;
    }
    if (c <= '9') {
      return c - '0';
    }
    if (c < 'A') {
      return INVALID;
    }
    if (c <= 'F') {
      return c - 'A' + 10;
    }
    if (c < 'a') {
      return INVALID;
    }
    if (c <= 'f') {
      return c - 'a' + 10;
    }
    return INVALID;
  }
674860
public static boolean isCJKChar( int c ) 
    {
        /*
         * @Note: added at 2015-11-25
         * for foreign country translated name recognize
         * add '·' as CJK chars
        */
        if ( c == 183 
                || Character.getType(c) == Character.OTHER_LETTER )
            return true;
        return false;
    }
216194
static boolean charEqualsIgnoreCase(char c1, char c2) {
        return c1 == c2 ||
                Character.toUpperCase(c1) == Character.toUpperCase(c2) ||
                Character.toLowerCase(c1) == Character.toLowerCase(c2);
    }
1096208
public static boolean isAlphanumeric(String s) {
        if (isEmpty(s)) return defaultEmptyOK;

        // Search through string's characters one by one
        // until we find a non-alphanumeric 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 or letter.
            char c = s.charAt(i);

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

        // All characters are numbers or letters.
        return true;
    }
427073
private static boolean isIdentifierChar(int c)
    {
        return (c >= '0' && c <= '9')
            || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
            || c == '-' || c == '+' || c == '.' || c == '_' || c == '&';
    }
1326311
function isNameChar(c) {
	return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') ||
		c === '_' || c === '$' || c === '.' || c === '-';
}
1331091
public static boolean isAllLetter(String text)
    {
        for (int i = 0; i < text.length(); ++i)
        {
            char c = text.charAt(i);
            if ((((c < 'a' || c > 'z')) && ((c < 'A' || c > 'Z'))))
            {
                return false;
            }
        }

        return true;
    }
401312
private static boolean isValidEscaping(char c) {
        return ((c == 'n') || (c == 'r') || (c == 't') || (c == 'f') || (c == 'b') || (c == '\\') || (c == '/')
                || (c == '"') || (c == 'u'));
    }