Merge pull request #90931 from aaronfranke/is-ascii-alphabet-char
Rename internal `is_ascii_char` to `is_ascii_alphabet_char`
This commit is contained in:
commit
659cf339bc
|
@ -344,10 +344,10 @@ Error JSON::_get_token(const char32_t *p_str, int &index, int p_len, Token &r_to
|
|||
r_token.value = number;
|
||||
return OK;
|
||||
|
||||
} else if (is_ascii_char(p_str[index])) {
|
||||
} else if (is_ascii_alphabet_char(p_str[index])) {
|
||||
String id;
|
||||
|
||||
while (is_ascii_char(p_str[index])) {
|
||||
while (is_ascii_alphabet_char(p_str[index])) {
|
||||
id += p_str[index];
|
||||
index++;
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ static _FORCE_INLINE_ bool is_binary_digit(char32_t c) {
|
|||
return (c == '0' || c == '1');
|
||||
}
|
||||
|
||||
static _FORCE_INLINE_ bool is_ascii_char(char32_t c) {
|
||||
static _FORCE_INLINE_ bool is_ascii_alphabet_char(char32_t c) {
|
||||
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
|
||||
}
|
||||
|
||||
|
|
|
@ -993,7 +993,7 @@ String TranslationServer::add_padding(const String &p_message, int p_length) con
|
|||
}
|
||||
|
||||
const char32_t *TranslationServer::get_accented_version(char32_t p_character) const {
|
||||
if (!is_ascii_char(p_character)) {
|
||||
if (!is_ascii_alphabet_char(p_character)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -489,11 +489,11 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri
|
|||
r_token.value = num.as_int();
|
||||
}
|
||||
return OK;
|
||||
} else if (is_ascii_char(cchar) || is_underscore(cchar)) {
|
||||
} else if (is_ascii_alphabet_char(cchar) || is_underscore(cchar)) {
|
||||
StringBuffer<> id;
|
||||
bool first = true;
|
||||
|
||||
while (is_ascii_char(cchar) || is_underscore(cchar) || (!first && is_digit(cchar))) {
|
||||
while (is_ascii_alphabet_char(cchar) || is_underscore(cchar) || (!first && is_digit(cchar))) {
|
||||
id += cchar;
|
||||
cchar = p_stream->get_char();
|
||||
first = false;
|
||||
|
|
|
@ -1187,7 +1187,7 @@ void TextEdit::_notification(int p_what) {
|
|||
}
|
||||
|
||||
if (!clipped && lookup_symbol_word.length() != 0) { // Highlight word
|
||||
if (is_ascii_char(lookup_symbol_word[0]) || lookup_symbol_word[0] == '_' || lookup_symbol_word[0] == '.') {
|
||||
if (is_ascii_alphabet_char(lookup_symbol_word[0]) || lookup_symbol_word[0] == '_' || lookup_symbol_word[0] == '.') {
|
||||
int lookup_symbol_word_col = _get_column_pos_of_word(lookup_symbol_word, str, SEARCH_MATCH_CASE | SEARCH_WHOLE_WORDS, 0);
|
||||
int lookup_symbol_word_len = lookup_symbol_word.length();
|
||||
while (lookup_symbol_word_col != -1) {
|
||||
|
|
|
@ -313,7 +313,7 @@ Dictionary CodeHighlighter::_get_line_syntax_highlighting_impl(int p_line) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!in_word && (is_ascii_char(str[j]) || is_underscore(str[j])) && !is_number) {
|
||||
if (!in_word && (is_ascii_alphabet_char(str[j]) || is_underscore(str[j])) && !is_number) {
|
||||
in_word = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1463,7 +1463,7 @@ String VisualShader::validate_port_name(const String &p_port_name, VisualShaderN
|
|||
return String();
|
||||
}
|
||||
|
||||
while (port_name.length() && !is_ascii_char(port_name[0])) {
|
||||
while (port_name.length() && !is_ascii_alphabet_char(port_name[0])) {
|
||||
port_name = port_name.substr(1, port_name.length() - 1);
|
||||
}
|
||||
|
||||
|
@ -1508,7 +1508,7 @@ String VisualShader::validate_port_name(const String &p_port_name, VisualShaderN
|
|||
|
||||
String VisualShader::validate_parameter_name(const String &p_name, const Ref<VisualShaderNodeParameter> &p_parameter) const {
|
||||
String param_name = p_name; //validate name first
|
||||
while (param_name.length() && !is_ascii_char(param_name[0])) {
|
||||
while (param_name.length() && !is_ascii_alphabet_char(param_name[0])) {
|
||||
param_name = param_name.substr(1, param_name.length() - 1);
|
||||
}
|
||||
if (!param_name.is_empty()) {
|
||||
|
|
Loading…
Reference in New Issue