My IsIsogram() function

Hi GabbyB and welcome to the community.

If you want to make the code clearer, move the FindLastChar call outside of the if and assign the result to a bool - the way you have it would work but has potential readability issues.

The second thing I spotted is you could change the != to a >, again a clarity thing. You’re not interested in anything below or equal to index, only when CharIndex indicates a match after the current position and the > makes this clearer.

As it happens, I would imagine this code works just fine and if it works, you could leave git alone.

I hope this helps and I really hope you’re enjoying the course.

1 Like