I was just talking with a friend about what would be the most efficient way to check if a std::string has only spaces. He needs to do this on an embedded project he is worki
if(str.find_first_not_of(' ') != std::string::npos) { // There's a non-space. }