Guest User

Untitled

a guest
Apr 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. bool FBullCowGame::IsLowercase(FString Word) const
  2. {
  3. //check the position of uppercase letter
  4. std::cout << "Uppercase position: " << Word.find_first_not_of("qwertyuiopasdfghjklzxcvbnm");
  5. //check the value of static const "npos" variable
  6. std::cout << ". npos = " << FString::npos << std::endl;
  7.  
  8. if (Word.length() <= 1
  9. || Word.find_first_not_of("qwertyuiopasdfghjklzxcvbnm") != FString::npos) // my solution using "find_first_not_of"
  10. {
  11. return false;
  12. }
  13.  
  14. return true;
  15. }
Add Comment
Please, Sign In to add comment