title: How to do a case-insensitive string comparison?
body: <p>I want to do a case-insensitive string comparison. What would be the easiest way to accomplish that? I have the below code which performs a case-sensitive operation.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  int main(int argc, char *argv[])
  {
      char *str1 = "String";
      char *str2 = "STRING";
  
      if (strncmp(str1, str2, 100) != 0)
      {
          printf("=(");
          exit(EXIT_FAILURE);
      }
  
      return 0;
  }
  </code></pre>