title: strstr and occurrences to match
body: <p>I have several possible occurrences to test with <code>strstr</code>.</p>
  
  <pre><code>if ((a = strstr(string, "FOO")) != NULL || (a = strstr(string, "BAR")) != NULL ||
      (a = strstr(string, "FOO2")) != NULL ||(a = strstr(string, "BAR2")) != NULL ||
      (a = strstr(string, "FOO3")) != NULL ||(a = strstr(string, "BAR3")) != NULL) // do something
  </code></pre>
  
  <p>and then based on the occurrence found I need to do </p>
  
  <pre><code> var = strlen("THE_ONE_MATCHED_ABOVE");
  </code></pre>
  
  <p>What would be a good way to do this without using lots of if statements?</p>