Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,960
    Thanks
    120
    Thanked 76 Times in 76 Posts

    equals with escapes

    the contence of s is:
    Code:
    <div style="color: #003362">&nbsp</div>
    if I do.

    Code:
    if s.equals("<div style=\"color: #003362\">&nbsp</div>")
    ...
    it does not work, that is, I get false.
    How to handle that ?
    Last edited by BubikolRamios; 01-14-2010 at 09:46 AM.

  • #2
    Regular Coder cs_student's Avatar
    Join Date
    Oct 2009
    Location
    ~/
    Posts
    195
    Thanks
    2
    Thanked 22 Times in 22 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •