title: how to search for series of strings in a sentence in kotlin
body: <p>I have an ArrayList of items. Each item has long strings for example
  (&quot;The cat is in the hat&quot;,&quot;It's warm outside&quot;,&quot;It's cold outside&quot;)</p>
  <p>what I am trying to do is search for a series of strings for example &quot;It's outside&quot; in any given order in the ArrayList above and it should find 2 of them.</p>
  <p>This is what I tried:</p>
  <pre><code>fun clickItem(criteria: String) {
    productList = productListAll.filter {it: Data
       it.title.contains(criteria, ignoreCase = true) 
    }
  } as ArrayList&lt;Data&gt;
  </code></pre>
  <p>This works fine when the words I am looking for are in sequence. However, I am trying to get strings in any given order. Does anyone know how to accomplish that?</p>