I’m looking forward to how much simpler I can make this when I’ve actually viewed lecture 65 and above. I used to do a bit of coding back in the day, and I might have jumped the gun a bit! It seems to work, however.
bool UBullCowCartridge::IsIsogram(FString Word)
{
if (Word.Len() < 1)
{
return false;
}
if (Word.Len() == 1)
{
return true;
}
int32 counter = 0;
int32 newindex = 1;
while (counter < (Word.Len()))
{
int32 index = newindex++;
while (index < Word.Len())
{
if (Word[counter] == Word[index])
{
return false;
}
++index;
}
++counter;
}
return true;
}