title: How to do case insensitive string comparison in Nunjucks
body: <p>I'm trying to do a case insensitive match inside of an <code>{% if %}</code> statement</p>
  
  <p>The following two approaches do <em>not</em> work:</p>
  
  <pre class="lang-js prettyprint-override"><code>{% set role = 'APP' %}
  
  {% if 'app' == role %}  1 {% endif %}
  {% if 'app' in role  %} 2 {% endif %}
  </code></pre>
  
  <p>Nunucks only has a little documentation on their <a href="https://mozilla.github.io/nunjucks/templating.html#comparisons" rel="nofollow noreferrer">comparison operators</a>, but don't refer to specific types.</p>
  
  <p>Nunjucks is a port of Jinja2 and there is a similar question on <a href="https://stackoverflow.com/q/23195321/1366033">how to lowercase a string in Jinja2</a></p>