Skip to content

Instantly share code, notes, and snippets.

@BasThomas
Created April 20, 2015 10:12
Show Gist options
  • 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