How to use substring in IOS using Objective-C

To use substring in IOS using Objective-C you can use the snippet below.

Sample Objective-C

NSString *myString = @"http://codesnippets.fesslersoft.de";
NSString *myNewString = [myString substringFromIndex:7]; //myNewString will be "codesnippets.fesslersoft.de"

Please rate this snippet

How to check if one one string contains another string in Javascript

To check if one one string contains another string in Javascript you can use the following method.

Sample JS

if(testString.indexOf("substring") > -1){
}

Please rate this snippet