Yes Another IsIsogram() function

Here’s my attempt:

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

TMap<char, bool> LetterSeen; // set up our map
for (auto Letter : Word)	 // for all letters of the word
{
	Letter = tolower(Letter); // handle mixed case	
	if (LetterSeen[Letter]) // if the letter is in the map
	{
		return false; // we do NOT have an isogram
	}
	else
	{
		LetterSeen[Letter] = true; // add the letter to the map as seen
	}	
}

return true;

}

Looks good! Just a tip for posting your code, highlight all of it and click the “Preformatted text” button and it’ll look a lot nicer.

Thanks for the tip. I’ll try that in the IsLowercase function I’m about to post.