qazmlp <> wrote:
> const char* big = "abcdefgh123" ;
> const char* small = "bcd" ;
>
> Now, I want to extract the remaining string from big, after the small
> contents.
> That is the result string should have "efgh123".
>
> I am confused about how to do it ?
>
> Please help! Thanks!
strstr() is your friend. It will find your needle in the haystack, the
returned pointer will point to the beginning of the needle, adding
strlen(small) to that pointer will yield a pointer to the position after
that substring.
--
Z ()
"LISP is worth learning for the profound enlightenment experience
you will have when you finally get it; that experience will make you
a better programmer for the rest of your days." -- Eric S. Raymond
|