override fun matches()

in src/main/kotlin/org/jetbrains/plugins/template/weatherApp/model/Location.kt [28:39]


    override fun matches(query: String): Boolean {
        val applicableCandidates = listOf(
            label,
            name,
            country,
            name.split(" ").map { it.first() }.joinToString(""),
            "${name.first()}${country.first()}",
            "${country.first()}${name.first()}"
        )

        return applicableCandidates.any { it.contains(query, ignoreCase = true) }
    }