title: Is there a function in C to find a substring overlap?
body: <p>in C, is there a function that when giver two strings, will return the substring overlap or size of the overlap? So like something that does:</p>
  
  <pre><code>char s1[5] = {cart};
  char s2[4] = {car};
  int overlap;
  overlap = get_overlap(s1, s2); /*or have overlap be a string if it returns the overlap*.
  </code></pre>
  
  <p>and then overlap would be 3.    </p>
  
  <p>If not, how do i make one that will return the int value of the overlap.</p>