Re: extracting string
qazmlp <email@example.com> wrote:
> const char* big = "abcdefgh123" ;
> const char* small = "bcd" ;
> Now, I want to extract the remaining string from big, after the small
> 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
"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
|All times are GMT. The time now is 06:04 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.