samad5353 samad5353 - 8 months ago 61
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)

}