Search code examples
iphoneobjective-ccocoa-touchios4

iPhone : How to check whether a substring exists in a string?


I have some string name and I want to compare whether that string contains substring like "_thumb.png".


Solution

  • [string rangeOfString:string1].location!=NSNotFound
    

    rangeOfString: documentation.