-
Notifications
You must be signed in to change notification settings - Fork 2
TO_UPPERCASE macro
Douglas Lyman edited this page Nov 28, 2022
·
1 revision
Converts an upper case character to its upper case counterpart.
#define TO_UPPERCASE(c) (c - '\x20')
char | wchar_t TO_UPPERCASE(char | wchar_t c);
c
A char
or wchar_t
character.
The converted char
or wchar_t
character.
This macro does not have any checks for if the character input is a letter or not, thus it is able to convert non-letter characters, which could lead to odd behaviour.
int main() {
TO_UPPERCASE('a'); // Returns 'A'.
TO_UPPERCASE('A'); // Error: Undefined behaviour.
TO_UPPERCASE('?'); // Error: Undefined behaviour.
}
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!