Check if a symbol is a Chinese character.

    Note
    ----

    Taken from http://stackoverflow.com/questions/16441633/python-2-7-test-if-characters-in-a-string-are-all-chinese-characters
518318
def is_chinese(name):
    
    if not name:
        return False
    for ch in name:
        ordch = ord(ch)
        if not (0x3400 <= ordch <= 0x9fff) and not (0x20000 <= ordch <= 0x2ceaf) \
                and not (0xf900 <= ordch <= ordch) and not (0x2f800 <= ordch <= 0x2fa1f): 
                return False
    return True
738079
def _is_whitespace(self, char):
        """"""
        # \t, \n, and \r are technically contorl characters but we treat them
        # as whitespace since they are generally considered as such.
        if char in [' ', '\t', '\n', '\r']:
            return True
        cat = unicodedata.category(char)
        if cat == 'Zs':
            return True
        return False
759122
def check_bidi(chars):
    

    # the empty string is valid, as it cannot violate the RandALCat constraints
    if not chars:
        return

    # first_is_RorAL = unicodedata.bidirectional(chars[0]) in {"R", "AL"}
    # if first_is_RorAL:

    has_RandALCat = any(is_RandALCat(c) for c in chars)
    if not has_RandALCat:
        return

    has_LCat = any(is_LCat(c) for c in chars)
    if has_LCat:
        raise ValueError("L and R/AL characters must not occur in the same"
                         " string")

    if not is_RandALCat(chars[0]) or not is_RandALCat(chars[-1]):
        raise ValueError("R/AL string must start and end with R/AL character.")
506473
function isSymbol(t, v) {
  if (v === null) {
    return false;
  }
  // Native Symbol.
  if (t === 'symbol') {
    return true;
  }
  // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
  if (v['@@toStringTag'] === 'Symbol') {
    return true;
  }
  // Fallback for non-spec compliant Symbols which are polyfilled.
  if (typeof Symbol === 'function' && v instanceof Symbol) {
    return true;
  }
  return false;
}
229071
def check_basestring(item):
    
    try:
        return isinstance(item, (basestring, unicode))
    except NameError:
        return isinstance(item, str)
107932
public static boolean isAlpha(String in) {
		char c = 0;
		for (int i = in.length(); i > 0; i--) {
			c = in.charAt(i - 1);
			if (!Character.isLetter(c)) {
				return false;
			}
		}
		return true;
	}
492983
def is_SYMBOL(token, *symbols):
    
    from symbols.symbol_ import Symbol
    assert all(isinstance(x, Symbol) for x in symbols)
    for sym in symbols:
        if sym.token != token:
            return False

    return True
1118064
public static boolean validChar(char toTest) {
        if (toTest >= 'A' && toTest <= 'Z') return true;
        if (toTest >= '0' && toTest <= '9') return true;
        
        return (toTest == '_' || toTest == '^' || toTest == '$' ||
                toTest == '~' || toTest == '!' || toTest == '#' ||
                toTest == '%' || toTest == '&' || toTest == '-' ||
                toTest == '{' || toTest == '}' || toTest == '(' ||
                toTest == ')' || toTest == '@' || toTest == '\''||
                toTest == '`');
    }
209693
def is_kanji(data):
    
    data_len = len(data)
    if not data_len or data_len % 2:
        return False
    if _PY2:
        data = (ord(c) for c in data)
    data_iter = iter(data)
    for i in range(0, data_len, 2):
        code = (next(data_iter) << 8) | next(data_iter)
        if not (0x8140 <= code <= 0x9ffc or 0xe040 <= code <= 0xebbf):
            return False
    return True
1161402
def identify_greek_word(input)
      input.each_char do |char|
        if (!GREEK_CHARACTERS.include?(char))
          return false
        end
      end

      true
    end
745150
private boolean isWord(String token) {
    if (token.length() == 1) {
      char c = token.charAt(0);
      if (!Character.isLetter(c)) {
        return false;
      }
    }
    return true;
  }
1268637
def isprintable(string):
    
    string = string.strip()
    if not string:
        return True
    if sys.version_info[0] == 3:
        try:
            return string.isprintable()
        except Exception:
            pass
        try:
            return string.decode('utf-8').isprintable()
        except Exception:
            pass
    else:
        if string.isalnum():
            return True
        printable = ('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST'
                     'UVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c')
        return all(c in printable for c in string)
916887
public static boolean findChinese(String str) {
        Matcher m = pattern.matcher(str);
        return m.find();
    }
677506
def is_cjk_punctuation(char):
    """"""
    lower = int('0x3000', 16)
    higher = int('0x300F', 16)
    return ord(char) >= lower and ord(char) <= higher
178384
def is_unicode_string(string):
    
    if string is None:
        return None
    if PY2:
        return isinstance(string, unicode)
    return isinstance(string, str)
658636
static private boolean isIdentChar(char x) {
    return (x == '$') || ((x >= 'a') && (x <= 'z')) || ((x >= 'A') && (x <= 'Z')) || ((x >= '0') && (x <= '9')) || (x == '_');
  }
479264
def is_indiclang_char(c,lang): 
    
    o=get_offset(c,lang)
    return (o>=0 and o<=0x7f) or ord(c)==DANDA or ord(c)==DOUBLE_DANDA