Two NSStrings are same but different when you compare them

Recently I was shocked by the fact that two NSStrings that resemble each other on NSLog may be different. It is because sometimes NSString can contain a zero width space character. Be aware of that and consider:

To conquer this you should clean your string from zero width white space characters before comparing:

Leave a Reply

Your email address will not be published. Required fields are marked *