Is there any reason why a string wouldn't equal itself? I am processing a large amount of strings and some strings are, in the end, not equaling themselves.
Here is an image that shows what I am talking about.
Any ideas?
RESOLVED: There is a carriage return (\r) attached to the end of one of the strings. I used String.length to see the lengths of each string, and they differed (5 and 6). I then looked through the string using String.charAt. In Chrome, this showed an empty string (""). However, the empty string was not a falsy value. I tried this in FireFox and it showed the carriage return.