-
Notifications
You must be signed in to change notification settings - Fork 2
IS_UPPERCASE macro
Douglas Lyman edited this page Nov 28, 2022
·
3 revisions
Checks if a character is an uppercase character.
#define IS_UPPERCASE(c) IN_RANGE(c, 'A', 'Z')
BOOL IS_UPPERCASE(char | wchar_t c);
c
A char
or wchar_t
character.
A BOOL that determines whether the character is uppercase or not.
This macro only compares single characters and not entire strings. Passing a pointer to a string will not work.
#include "Definitions.h"
int main() {
IS_UPPERCASE('A'); // Resolves to true.
IS_UPPERCASE(L'A'); // Resolves to true.
IS_UPPERCASE('a'); // Resolves to false.
IS_UPPERCASE('2'); // Non letter, always resolves to false.
IS_UPPERCASE("ABC"); // Error: Cannot compare entire string.
}
Header | Definitions.h |
---|---|
Assembly | None |
The Project Artemis components: Artemis - Artemis-Loader - Artemis-Installer - Artemis-Extension-Framework
The team behind Project Artemis: Sigma - Monke - Tavreth
Contact us at artemis.singularity@gmail.com or join our Discord server!