I have an array containing a number of strings. I have used contains() (see below) to check if a certain string exists in the array however I would like to chec
contains()
In Swift 4:
let itemsArray = ["Google", "Goodbye", "Go", "Hello"] let searchString = "Go" let filterArray = itemsArray.filter({ { $0.range(of: searchString, options: .caseInsensitive) != nil} }) print(filterArray)