determine whether a character is a kyouiku kanji character
481042
function isKyouikuKanji(ch) {
    return includes(kyouikuKanji.grade1, ch) ||
    includes(kyouikuKanji.grade2, ch) ||
    includes(kyouikuKanji.grade3, ch) ||
    includes(kyouikuKanji.grade4, ch) ||
    includes(kyouikuKanji.grade5, ch) ||
    includes(kyouikuKanji.grade6, ch);
}
1326311
function isNameChar(c) {
	return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') ||
		c === '_' || c === '$' || c === '.' || c === '-';
}
454652
private static boolean isValidChar(char c) {
        if ( c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z' ) {
            return true;
        }
        return c != ' ' && c != '\u00A0' && !Character.isWhitespace(c) && !Character.isWhitespace(c);
    }
489050
function hasMarkOnChar(character, mark) {
  const arrChars = character.marks.toJS();
  const marksSize = arrChars.length;
  for (let i = 0; i < marksSize; i++) {
    if (arrChars[i].type === mark) {
      return true;
    }
  }
  return false;
}
1209072
def character_to_vk(self, character):
        
        for vk in self.non_layout_keys:
            if self.non_layout_keys[vk] == character.lower():
                return (vk, [])
        for vk in self.layout_specific_keys:
            if self.layout_specific_keys[vk][0] == character:
                return (vk, [])
            elif self.layout_specific_keys[vk][1] == character:
                return (vk, ['shift'])
        raise ValueError("Unrecognized character: {}".format(character))
81394
function somechars() {
		var was = false;
		if(!stringmode && !commentmode) {
			if(prototype) {
				switch (character) {
					case '(':
						prencount ++;
						break;
					case ')':
						was = prencount > 0;
						prencount --;
						if(was && prencount === 0) {
							prototype = null;
						}
						break;
					case '{':
						curlcount ++;
						break;
					case '}':
						was = curlcount > 0;
						curlcount --;
						if(was && curlcount === 0) {
							prototype = null;
						}
						break;
				}
			}
		}
	}
952846
def char(i):
    

    i = ord(i)
    if i not in font:
        return [(0,)] * 8
    return [(ord(row),) for row in font[i].decode('hex')]
677506
def is_cjk_punctuation(char):
    """"""
    lower = int('0x3000', 16)
    higher = int('0x300F', 16)
    return ord(char) >= lower and ord(char) <= higher
663616
public static boolean isIdentifier(CharSequence s) {
        int limit=s.length();
        if(limit==0) {
            return false;
        }
        int start=0;
        do {
            if(isSyntaxOrWhiteSpace(s.charAt(start++))) {
                return false;
            }
        } while(start<limit);
        return true;
    }
1312669
function hiraganaToKatakana(str) {
  if (!hasKana(str)) {
    return str;
  }
  return str.split('').map(charCodeToKatakana).join('');
}
784950
private boolean isStyle(String style) {
		for (int i = 0; i < style.length(); ++i) {
			char c = style.charAt(i);
			if (!Character.isWhitespace(c)) {
				return (c == '<');
			}
		}
		return false;
	}
1127342
public static boolean isPrintable( char c ) {
	    Character.UnicodeBlock block = Character.UnicodeBlock.of( c );
	    return (!Character.isISOControl(c)) 	&& 
	    		c != KeyEvent.CHAR_UNDEFINED 	&&
	            block != null 					&&
	            block != Character.UnicodeBlock.SPECIALS;
	}
837829
def isChar(ev):
    
    text = ev.text()
    if len(text) != 1:
        return False

    if ev.modifiers() not in (Qt.ShiftModifier, Qt.KeypadModifier, Qt.NoModifier):
        return False

    asciiCode = ord(text)
    if asciiCode <= 31 or asciiCode == 0x7f:  # control characters
        return False

    if text == ' ' and ev.modifiers() == Qt.ShiftModifier:
        return False  # Shift+Space is a shortcut, not a text

    return True
145912
function maybeIdentifier(key) {
        var result = false,
            i;

        for (i = 0; i < key.length; i++) {
            result = Acorn.isIdentifierChar(key.charCodeAt(i));
            if (!result) {
                break;
            }
        }

        return result;
    }
1347518
private static int selectStyle(char ch) {
        switch (ch) {
        case 'S':
            return SHORT;
        case 'M':
            return MEDIUM;
        case 'L':
            return LONG;
        case 'F':
            return FULL;
        case '-':
            return NONE;
        default:
            throw new IllegalArgumentException("Invalid style character: " + ch);
        }
    }
576243
def check_registered_trademark_symbol(text):
    """"""
    err = "typography.symbols.trademark"
    msg = u"(R) is a goofy alphabetic approximation, use the symbol ®."
    regex = "\([rR]\)"

    return existence_check(
        text, [regex], err, msg, max_errors=3, require_padding=False)
1280169
private void scanIdent() {
        boolean isJavaIdentifierPart;
        char high;
        reader.putChar(true);
        do {
            switch (reader.ch) {
            case 'A': case 'B': case 'C': case 'D': case 'E':
            case 'F': case 'G': case 'H': case 'I': case 'J':
            case 'K': case 'L': case 'M': case 'N': case 'O':
            case 'P': case 'Q': case 'R': case 'S': case 'T':
            case 'U': case 'V': case 'W': case 'X': case 'Y':
            case 'Z':
            case 'a': case 'b': case 'c': case 'd': case 'e':
            case 'f': case 'g': case 'h': case 'i': case 'j':
            case 'k': case 'l': case 'm': case 'n': case 'o':
            case 'p': case 'q': case 'r': case 's': case 't':
            case 'u': case 'v': case 'w': case 'x': case 'y':
            case 'z':
            case '$': case '_':
            case '0': case '1': case '2': case '3': case '4':
            case '5': case '6': case '7': case '8': case '9':
                break;
            case '\u0000': case '\u0001': case '\u0002': case '\u0003':
            case '\u0004': case '\u0005': case '\u0006': case '\u0007':
            case '\u0008': case '\u000E': case '\u000F': case '\u0010':
            case '\u0011': case '\u0012': case '\u0013': case '\u0014':
            case '\u0015': case '\u0016': case '\u0017':
            case '\u0018': case '\u0019': case '\u001B':
            case '\u007F':
                reader.scanChar();
                continue;
            case '\u001A': // EOI is also a legal identifier part
                if (reader.bp >= reader.buflen) {
                    name = reader.name();
                    tk = tokens.lookupKind(name);
                    return;
                }
                reader.scanChar();
                continue;
            default:
                if (reader.ch < '\u0080') {
                    // all ASCII range chars already handled, above
                    isJavaIdentifierPart = false;
                } else {
                    if (Character.isIdentifierIgnorable(reader.ch)) {
                        reader.scanChar();
                        continue;
                    } else {
                        int codePoint = reader.peekSurrogates();
                        if (codePoint >= 0) {
                            if (isJavaIdentifierPart = Character.isJavaIdentifierPart(codePoint)) {
                                reader.putChar(true);
                            }
                        } else {
                            isJavaIdentifierPart = Character.isJavaIdentifierPart(reader.ch);
                        }
                    }
                }
                if (!isJavaIdentifierPart) {
                    name = reader.name();
                    tk = tokens.lookupKind(name);
                    return;
                }
            }
            reader.putChar(true);
        } while (true);
    }