title: How to check if string starts with certain string in C?
body: <p>For example, to validate the valid Url, I'd like to do the following</p>
  
  <pre><code>char usUrl[MAX] = "http://www.stackoverflow"
  
  if(usUrl[0] == 'h'
     &amp;&amp; usUrl[1] == 't'
     &amp;&amp; usUrl[2] == 't'
     &amp;&amp; usUrl[3] == 'p'
     &amp;&amp; usUrl[4] == ':'
     &amp;&amp; usUrl[5] == '/'
     &amp;&amp; usUrl[6] == '/') { // what should be in this something?
      printf("The Url starts with http:// \n");
  }
  </code></pre>
  
  <p>Or, I've thought about using <code>strcmp(str, str2) == 0</code>, but this must be very complicated.</p>
  
  <p>Is there a standard C function that does such thing?</p>