Skip to content

Instantly share code, notes, and snippets.

@BasThomas
Created April 20, 2015 10:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BasThomas/75361ef593485069e28b to your computer and use it in GitHub Desktop.
Save BasThomas/75361ef593485069e28b to your computer and use it in GitHub Desktop.
/**
Filters the list of clients according to the query.
:param: searchText The query.
*/
func filterContentForSearchText(searchText: String)
{
self.filteredClients = self.clients.filter(
{
(client: Client) -> Bool in
return client.name.lowercaseString.hasPrefix(searchText.lowercaseString)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment