Returns true if the character is in any of the symbol categories.
352356
public static boolean isSymbol(char ch) {
    switch (Character.getType(ch)) {
      case Character.MATH_SYMBOL:
      case Character.CURRENCY_SYMBOL:
      case Character.MODIFIER_SYMBOL:
      case Character.OTHER_SYMBOL:
        return true;
        
      default:
        return false;
    }
  }
1308774
static boolean isGapSymbol(final Symbol symbol) {
        return AlphabetManager.getGapSymbol().equals(symbol)
            || DNATools.getDNA().getGapSymbol().equals(symbol);
    }
1284094
def _is_latin_letter(cls, letter):
        """"""
        # Combining marks are a subset of non-spacing-mark
        if (not is_letter(letter) and
            Category.get(letter) != Category.NON_SPACING_MARK):
            return False
        block = Block.get(letter)
        return (block == Block.BASIC_LATIN or
                block == Block.LATIN_1_SUPPLEMENT or
                block == Block.LATIN_EXTENDED_A or
                block == Block.LATIN_EXTENDED_ADDITIONAL or
                block == Block.LATIN_EXTENDED_B or
                block == Block.COMBINING_DIACRITICAL_MARKS)
538957
def has_control_chars(i):
        
        if not hasattr(i, 'type_'):
            return False

        if i.type_ != Type.string:
            return False

        if i.token in ('VAR', 'PARAMDECL'):
            return True  # We don't know what an alphanumeric variable will hold

        if i.token == 'STRING':
            for c in i.value:
                if 15 < ord(c) < 22:  # is it an attr char?
                    return True
            return False

        for j in i.children:
            if Translator.has_control_chars(j):
                return True

        return False
1361412
boolean checkPrefix(char[] chars, int[] cursor) {
    if (chars.length > cursor[0] && chars[cursor[0]] == MatchSpace.NONWILD_MARKER)
      return false;
    if (prefix == null)
      return true;
    if (cursor[1] - cursor[0] < prefix.minlen)
      // a conservative test, but if we can't pass it, we'll certainly fail later
      return false;
    for (int i = 0; i < prefix.items.length; i++) {
      Object item = prefix.items[i];
      if (item == Pattern.matchOne)
        if (!topicSkipForward(chars, cursor))
          return false;
        else
          ; // topic skip succeeded so continue
      else if (!matchForward(chars, (char[]) item, cursor))
        return false;
      // else this phase succeeded so continue
    }
    // The prefix matches exactly.  But, unless we are at the end of the string,
    // the next character MUST be a separator.
    return cursor[0] == cursor[1] || 
      chars[cursor[0]] == MatchSpace.SUBTOPIC_SEPARATOR_CHAR;
  }
1173517
private static int getType(int ch)
    {
        if (UCharacterUtility.isNonCharacter(ch)) {
            // not a character we return a invalid category count
            return NON_CHARACTER_;
        }
        int result = UCharacter.getType(ch);
        if (result == UCharacterCategory.SURROGATE) {
            if (ch <= UTF16.LEAD_SURROGATE_MAX_VALUE) {
                result = LEAD_SURROGATE_;
            }
            else {
                result = TRAIL_SURROGATE_;
            }
        }
        return result;
    }
493364
private static boolean isConstantType(Type symbolType) {
		return symbolType.isPrimitive() || symbolType.is("java.lang.String") ||  symbolType.is("java.lang.Byte") ||
				symbolType.is("java.lang.Character") ||
				symbolType.is("java.lang.Short") ||
				symbolType.is("java.lang.Integer") ||
				symbolType.is("java.lang.Long") ||
				symbolType.is("java.lang.Float") ||
				symbolType.is("java.lang.Double") ||
				symbolType.is("java.lang.Boolean");
	}
658636
static private boolean isIdentChar(char x) {
    return (x == '$') || ((x >= 'a') && (x <= 'z')) || ((x >= 'A') && (x <= 'Z')) || ((x >= '0') && (x <= '9')) || (x == '_');
  }
842537
private boolean isWhitespace(char ch)
    {
        if (linews) 
            return Character.isWhitespace(ch);
        else
            return ch != '\n' && ch != '\r' && Character.isWhitespace(ch);
    }
785121
public static boolean isString( Class clazz ) {
      return clazz != null
            && (String.class.isAssignableFrom( clazz ) || (Character.TYPE.isAssignableFrom( clazz ) || Character.class.isAssignableFrom( clazz )));
   }
137999
public static boolean isAllAlpha(String str) {

	if (str == null) return false;

	for (int i = str.length() - 1; i >= 0; i--) {

	    if (!Character.isLetter(str.charAt(i))) return false;
	}

	return true;
    }
392888
def is_symbol_wildcard(term: Any) -> bool:
    """"""
    return isinstance(term, type) and issubclass(term, Symbol)
251027
public static boolean isIntCategory(ClassNode type) {
        return  type==byte_TYPE     ||  type==char_TYPE     ||
                type==int_TYPE      ||  type==short_TYPE;
    }
665692
def is_potential_flag(token: str, parser: argparse.ArgumentParser) -> bool:
    """"""
    # if it's an empty string, it was meant to be a positional
    if not token:
        return False

    # if it doesn't start with a prefix, it was meant to be positional
    if not token[0] in parser.prefix_chars:
        return False

    # if it's just a single character, it was meant to be positional
    if len(token) == 1:
        return False

    # if it looks like a negative number, it was meant to be positional
    # unless there are negative-number-like options
    if parser._negative_number_matcher.match(token):
        if not parser._has_negative_number_optionals:
            return False

    # if it contains a space, it was meant to be a positional
    if ' ' in token:
        return False

    # Looks like a flag
    return True
650240
public static boolean isValueCode(char ch)
    {
        return ch == '@'
                || ch == ':'
                || ch == '%'
                || ch == '+'
                || ch == '#'
                || ch == '<'
                || ch == '>'
                || ch == '*'
                || ch == '/'
                || ch == '!';
    }
624772
def is_char_in_pairs(pos_char, pairs):
        """"""
        for pos_left, pos_right in pairs.items():
            if pos_left < pos_char < pos_right:
                return True

        return False
796667
private static boolean isCategorical(LinkedHashMap<String, Double> values) {
		try {
			for (String value : values.keySet()) {
				Double.parseDouble(value);
			}
			return false;
		} catch (Exception e) {
			return true;
		}

	}