12345
std::string name; // ... if (std::tolower(name[0]) == 'w' && std::tolower(name[name.size() - 1]) == 'f') { // output }