My Solution for is Lowercase ()

First time to share in discussion…

bool FBullCowGame::IsLowercase(Fstring guess) const
{
	int32 Answerlength = guess.length(); // setup variable for get the answer length
	for (auto Wordlength = 0; Wordlength < Answerlength; Wordlength ++) //loop for every word in the answer
	{
		if (islower(guess[Wordlength])) // if the word currently checking is lowercase return true; if not, return false
		{
			return true;
		}
		else
		{
			return false;
		}
	}
	return true ;
}

Privacy & Terms