bool FBullCowGame::IsLowercase(FString Letters) const
{
TMap<char, bool> LowerCaseSeen; // setup map
for (auto Case : Letters) // for all cases of the letters
{
Case = (Case); //sumbit entered letter in container
if (isupper(Case)) { // if letter is upper
return false; // we do NOT have lowercase letters
}
else { // otherwise
LowerCaseSeen[Case] = true;
}
} // add letter to the map as lowercase
return true; // handling /0
}
Woot! First time I fully did something on my own and it worked! So happy! Although after I saw other people’s solutions I guess I made it a bit more long, than it could’ve been. Well I guess I thought that part of the challenge was to use another map.