Is there any functions to check the character (example 'A') is in caps or small?
if not, what other methods are there?
Printable View
Is there any functions to check the character (example 'A') is in caps or small?
if not, what other methods are there?
There are all the is_____ functions in <ctype.h>, such as isalpha, isupper, ispunct, islower, etc. (I'll leave it to you to figure out which ones you want.)
Think that is one way (also) -- that is if I've got all the PacMans in the right direction.Code:if ('a' > 'b') {
if ((ch <= 'A') && (ch >= 'Z')) return TRUE;
} else {
if ((ch >= 'A') && (ch <= 'Z')) return TRUE;
}
return FALSE;