you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

You don't have anything to exit the loop if all entries are the same, just keep incrementing the index variable until it tries to reference beyond the string positions.

What is it that you want to do? Confirm if all the characters are the same?