title: jQuery check if element has a class beginning with some string
body: <p>I need to loop through some elements in the page and then, for each one, if it had a class beginning with, for example, "C", do something. </p>
  
  <pre><code>$('#dialog li').each(function(){
      if ($(this).hasClass("^C")){
           //do something
      }
  }
  </code></pre>
  
  <p>It may sound silly, but what selector/method should I use on the if clause?</p>