Devang Devang - 1 year ago 81
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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download