[cstring] Search string from pos

Hi, basically what I want to do is have something similar to the strstr function, but it is essential in my program for it to start searching at one point, rather than the whole string. I know a C++ string object has methods that can do this, but I've already gone far into my project that uses C. Is there anything in the C Library I can use to do this, or am I SOL?

Thanks.
Last edited on
Just pass where you want the string to "start". e.g.

1
2
strstr(cstr+2, anothercstr+5); 
//look from cstr[3] to the end, and same for anothercstr[5] 
Perfect. Thank you.
Topic archived. No new replies allowed.