Answers for "get element at a particular index of a string in swift"

1

index of string in array swift

let arr = ["a","b","c","a"]

let indexOfA = arr.firstIndex(of: "a") // 0
let indexOfB = arr.lastIndex(of: "a") // 3
Posted by: Guest on January-30-2020

Code answers related to "get element at a particular index of a string in swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language