Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool FBullCowGame::IsLowercase(FString Word) const
- {
- //check the position of uppercase letter
- std::cout << "Uppercase position: " << Word.find_first_not_of("qwertyuiopasdfghjklzxcvbnm");
- //check the value of static const "npos" variable
- std::cout << ". npos = " << FString::npos << std::endl;
- if (Word.length() <= 1
- || Word.find_first_not_of("qwertyuiopasdfghjklzxcvbnm") != FString::npos) // my solution using "find_first_not_of"
- {
- return false;
- }
- return true;
- }
Add Comment
Please, Sign In to add comment