I have a string that is one of the following forms
ABC // all caps:
// not necessarily "ABC", could be any combination of capital letters
Abc // first letter capitalized, rest are lowercase
abc // all lowercase
and I need to distinguish which of these three cases it is... what's the best way to do this? There doesn't seem to be an islower()
or isupper()
function; I suppose I could make one using strtoupper()
or strtolower()
.