Challenge Implementation

This one was relatively easy. Just copied the base code from the IsIsogram(). Got it right first try too. This is exciting.

bool FBullCowGame::IsLowercase(FString Word) const
{
	// treat 0 and 1 letter words as lowercase
	if (Word.length() <= 1) { return true; }

TMap<char, bool> LetterSeen;	// setup our map
for (auto Letter : Word)		// for all letters of the word
{
	if ( !islower( Letter ) ) {
		return false;
	} 
}

return true;	// for example: in cases where /0 is entered}

Not sure why the closing bracket shows up like that.

Privacy & Terms