Last active
June 22, 2017 08:28
-
-
Save Yangff/f9944276a72acb3808968a2b64139db0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void del_substr(char *str, const char *substr) { | |
for (int i = 0, j = 0; *str = *(str+i); str += !!*(substr+j), i += !*(substr+j) * j) | |
for (j = 0; *(str+i+j) == *(substr+j) && *(substr+j); j++); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment