title: How to get the first part of a C String?
body: <p>I have two strings:</p>
  
  <pre><code>prettyCoolString
  CoolString
  </code></pre>
  
  <p>I want to only get the part that says <code>pretty</code>. I looked through the C string functions, but I cannot find out how to find the position of CoolString in prettyCoolString.</p>
  
  <p>In Java, I can just find where CoolString appears in prettyCoolString, but with C, all I can do is return a pointer to the place where it begins. I want to find the position so I can just read the first x characters from prettyCoolString.</p>
  
  <p>Here is what I mean by first part:
  I want to get the contents of the first string that appear before the second string appears in the first string.</p>