string c++ if letter is lowercase code example
Example 1: string c++ if letter is lowercase
for(int i=0;i<str.size();i++){
int c = str[i];
if (islower(c))
str[i] = toupper(c);
}
Example 2: string c++ if letter is lowercase
str[i] = toupper(str[i]);
Example 3: string c++ if letter is lowercase
if (isupper(str[i])) {
// str[i] is uppercase
}
Example 4: isalpha c++
char test='a';
cout<<isalpha(test);