title: Select2: Trim input whitespace
body: <p>I am using Select2</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function() {
    $(".select2").select2();
  });
  &lt;/script&gt;
  
  &lt;select class="select2"&gt;
    &lt;option&gt;Anna&lt;/option&gt;
    &lt;option&gt;Bob Hunter&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I want to find Anna when I search for <code>Anna</code> even if there are whitespaces before or after the name. If possible, I would even like to reduce multiple whitespaces always to one, such that <code>Bob      Hunter</code> would find <code>Bob Hunter</code>. Is something like this possible? I couln't find anything like that in the <a href="https://select2.github.io/options.html" rel="nofollow noreferrer">options docs</a>.</p>