-2

Possible Duplicate:
Finding a substring in a NSString object

Something like: If in "http://test.ru/test/Lala/test.html" is "/test/Lala/" then perform the action

Community
  • 1
  • 1
  • 1
    Please post what you have done so far. Just asking us for the answer will probably not get you results. – NickLH Nov 09 '11 at 13:37
  • Please refer this SO question http://stackoverflow.com/questions/3613591/finding-a-substring-in-a-nsstring-object – Sohan Nov 09 '11 at 13:55

1 Answers1

1

You can check for your substring like this:

NSRange range = [myString rangeOfString:mySubstring];

if (range.location != NSNotFound) {
    // do you action
}
flohei
  • 5,248
  • 10
  • 36
  • 61