Also, if you're doing it in C, you can probably hack something using strstr() and playing with string pointer offsets. Probably less efficient and more obtuse, though.
Code:
for ( i=17; i<32; i++ )
  offset = strstr(data, data+i)
  if ( offset != i )
    return i
return -1


Edited by wfaulk (27/07/2010 18:16)
Edit Reason: added pseudocode
_________________________
Bitt Faulk