bool const UBullCowCartridge::IsIsogram(const FString& word) const
{
for (int32 i = 0, j = i + 1; i < word.Len() - 1; ++i)
{
for (j = i + 1; j < word.Len(); ++j)
{
if (word[i] == word[j]) return false;
}
}
return true;
}
Note j is initialized in the outer for loop to avoid allocating a new int each loop.