mirror of
https://github.com/DanilaFe/abacus
synced 2024-11-17 08:03:09 -08:00
Add a matches function.
This commit is contained in:
parent
5a57544067
commit
8c3de54d0c
|
@ -14,4 +14,13 @@ package org.nwapw.abacus.function
|
|||
*/
|
||||
data class Documentation(val codeName: String, val name: String,
|
||||
val description: String, val longDescription: String,
|
||||
val type: DocumentationType)
|
||||
val type: DocumentationType) {
|
||||
|
||||
fun matches(other: String): Boolean {
|
||||
return codeName.toLowerCase().contains(other.toLowerCase()) ||
|
||||
name.toLowerCase().contains(other.toLowerCase()) ||
|
||||
description.toLowerCase().contains(other.toLowerCase()) ||
|
||||
longDescription.toLowerCase().contains(other.toLowerCase())
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user