PDA

View Full Version : equals with escapes


BubikolRamios
01-14-2010, 07:45 AM
the contence of s is:

<div style="color: #003362">&nbsp</div>


if I do.


if s.equals("<div style=\"color: #003362\">&nbsp</div>")
...

it does not work, that is, I get false.
How to handle that ?

cs_student
01-14-2010, 11:28 PM
Off hand I can not see why the two would not be equal. They have the same case as well.

We know one thing for sure, s is not equal to the string you compared it to. If the string you compared it to is correct, then s must be incorrect.

Maybe trying to print out s and make sure it's in all lower case.


Seeing how/what s is would be really helpful.