Removing substring from a string

from https://stackoverflow.com/questions/4833347/removing-substring-from-a-string

void removeSubstring(char *s,const char *toremove)
{
    while( s=strstr(s,toremove) )
        memmove(s,s+strlen(toremove),1+strlen(s+strlen(toremove)));
}


留言

熱門文章