bool XMLParser::parseToken() { _token.clear(); while (isValidNameChar(_char)) { _token += _char; _char = _stream->readByte(); } return isspace(_char) != 0 || _char == '>' || _char == '=' || _char == '/'; }
static void appendInputDeviceConfigurationFileRelativePath(String8& path, const String8& name, InputDeviceConfigurationFileType type) { path.append(CONFIGURATION_FILE_DIR[type]); for (size_t i = 0; i < name.length(); i++) { char ch = name[i]; if (!isValidNameChar(ch)) { ch = '_'; } path.append(&ch, 1); } path.append(CONFIGURATION_FILE_EXTENSION[type]); }