You can explicitly convert the String instance to an NSString instance using the as keyword:
var str1 = "This is a Swift string" print((str1 as NSString).containsString("Swift")) //true
Once you have converted the String instance to an NSString instance, you can call the containsString() method.
To get string length.
var str1 = "This is a Swift string" print((str1 as NSString ).length) //22