Devang Devang - 1 year ago 55
Objective-C Question

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".

Answer Source
[string rangeOfString:string1].location!=NSNotFound

rangeOfString: documentation.