title: Explode a string into array with Twig?
body: <p>Is there any function for splitting a string into chunks based on a separator? The opposite of <code>join</code> filter.</p>
  
  <p>I mean something like <code>explode</code> in PHP. I need to check if <code>class</code> parameter contains a given string:</p>
  
  <pre><code>{% macro nav_item(route, label, class, tooltip, placement) %}
  {% spaceless %}
      {% if 'icon-white' in class|explode(' ') %}
      {% edif %}
  {% endspaceless %}
  {% endmacro %}
  </code></pre>