Horje
check if whole string is uppercase Code Example
check if whole string is uppercase
#include <iostream>
#include <string>
#include <algorithm>

int main() {
    std::string s = "HELLo";
    if (std::all_of(s.begin(), s.end(), [](unsigned char c){ return std::isupper(c); })) {
        std::cout << "Is uppercase." << '\n';
    } else {
        std::cout << "Is not uppercase." << '\n';
    }
}




Cpp

Related
how to get input in cpp Code Example how to get input in cpp Code Example
c++ for in Code Example c++ for in Code Example
hashmap c++ Code Example hashmap c++ Code Example
how to get last element of set in c++ Code Example how to get last element of set in c++ Code Example
parallelize for loop c++ Code Example parallelize for loop c++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10