Skip to content

Instantly share code, notes, and snippets.

@dmytro-anokhin
Last active September 24, 2021 18:46
Show Gist options
  • Save dmytro-anokhin/0c1ec41d90d33bba27b09b9659eaa33f to your computer and use it in GitHub Desktop.
Save dmytro-anokhin/0c1ec41d90d33bba27b09b9659eaa33f to your computer and use it in GitHub Desktop.
extension CitiesCache {
func lookup(prefix: String) -> [String] {
cities.filter { $0.hasCaseAndDiacriticInsensitivePrefix(prefix) }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment