Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • That's literally the same thing that my solution provided... currentClientDetails = clientDetails.filter({ $0.contains(searchText.lowercased()}) except that mine will check any matches, yours will only check the leading matches. Commented Apr 6, 2020 at 20:16
  • i get error at contains when i use it. is there a solution? @xTwisteDx Commented Apr 6, 2020 at 20:20
  • I think I have my {} in the wrong spot. I don't have XCode available at the moment. Try removing the (). Commented Apr 6, 2020 at 20:26
  • currentClientDetails = clientDetails.filter({ $0.CLNT_FULLNAME.contains(searchText) }) Thank you for the inspiration @xTwisteDx. My problem is totally solved Commented Apr 6, 2020 at 20:35