samad5353 samad5353 - 1 month ago 7
iOS Question

How to get range of substring in swift3?

How to get range of substring in swift3?

let string = "Please Click Here"


I need range of click

Answer
let string = "Please Click Here"
if let range = string.range(of: "Click") {
   print(range)

}