filterByQuery

fun List<Country>.filterByQuery(query: String, locale: String? = null, fields: Set<FilterField> = FilterField.all): List<Country>

Filters countries by query using the selected fields.

Matching is case-insensitive substring matching, with fields combined using OR semantics.

Parameters

query

Text to search for

locale

BCP 47 language tag for localized fields, or null for the system default

fields

Fields to search. Defaults to FilterField.all