https://kotlinlang.org logo
Title
k

karelpeeters

08/16/2017, 9:45 PM
contains
checks for an exact match, so it doesn't really fit your use case.
n

nkiesel

08/16/2017, 10:14 PM
Did you mean the first query to be
"Hel"
or really
"Hl"
? If the latter: how should that match? using regex
"(?i).*H.*l.*"
?
k

karelpeeters

08/16/2017, 10:16 PM
I think he wants to check whether the taget string contains all of the characters of the query string. @lab?
n

nkiesel

08/16/2017, 11:30 PM
that would be a strange filter. Better wait than speculate
l

lab

08/17/2017, 3:14 AM
Sorry for the late reply @nkiesel @karelpeeters I got kick out of a library (there're closing) 😛 The query is really
Hl
, as in the target string contains all of the characters from the query string. Since Hello and Hell both have "h" and "l", they are chosen.