Is there any existing function that looks for the index of a substring inside another string? A method like .indexOfSubstring
thank does this:
let word: String = "Hey there, how are you?"
let indexOf: Int = word.indexOfSubstring("ere, how are")
println("index = " + \(indexOf))
and prints:
index = 6