Devang Devang - 3 months ago 10
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
[string rangeOfString:string1].location!=NSNotFound

rangeOfString: documentation.

Comments