Implementation of IsLowercase()

Hey all (again), :laughing:

I think I got the solution for the helper method IsLowercase() done. Here is my approach. If you want to you can leave some feedback. :slight_smile:

bool FBullCowGame::IsLowercase(FString Word) const
{

    // If the word is an empty string, \0 or is a simple space asume it is lowercase
    if(Word.length() == 0 || Word == "\0" || Word == " ") return true;

    // Loop thrugh each character of the word and find out if it is lowercase or not
    for(auto Letter : Word) {
        if(Letter != tolower(Letter)) return false;
    }
    return true;
}

By the way: This course is so good. I can’t wait for the remastered sections.

Kind regards
Shadowsound

Privacy & Terms