xcode iOS compare strings

前端 未结 5 2064
北恋
北恋 2020-12-14 15:37

How do i compare a website result with a predicted result.

@\"document.getElementsByTagName(\'body\')[0].outerHTML\"

is predicted to contai

5条回答
  •  醉酒成梦
    2020-12-14 16:00

    We cannot comapre the strings with ==
    We have to use isEqualToString:

    if([str1 isEqualToString:str2])
    {
    }
    else
    {
    }
    

提交回复
热议问题