Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename internal is_ascii_char to is_ascii_alphabet_char #90931

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

aaronfranke
Copy link
Member

static _FORCE_INLINE_ bool is_ascii_alphabet_char(char32_t c) {
	return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
}

Reasoning: This is the non-numeric version of is_ascii_alphanumeric_char. is_ascii_char can be misleading because it could imply all ASCII characters, including numbers, symbols, and control characters. Since this method explicitly only checks for alphabetical characters, it should be called is_ascii_alphabet_char (or similar).

@akien-mga akien-mga merged commit 659cf33 into godotengine:master Apr 22, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@aaronfranke aaronfranke deleted the is-ascii-alphabet-char branch April 22, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants