Compare two strings with contains function

I am trying to verify if two strings are equal with the contains function but I am not achieving the desired result. Is there another way to compare two strings? (I already tried the trim and tolower functions)    
1 answers

Hi Nicole Baptista,

        If you convert the $Variable string to UTF-16 or ASCII character, you will find out the difference between non-breaking spaces and normal spaces. Non-breaking spaces are not considered Space. So If we use trim() or replaceAll() function,
         It will not work. You need to manually replace these non-breaking spaces with normal spaces and then apply replaceAll($Variable,' ','') to remove all the spaces in that string. For your reference, I will share the ASCII converter and UTF-16 converter links to verify, whether $Variable has non-breaking spaces or not. horizontal space (\u00a0) is one of the non-breaking space. Just check this one.

White space character table doc link :

If it's there, just replaces this \u00a0 with normal space.
I hope it will solve your issue!


Thanks and regards,

Vijayabharathi V