Last time, I showed how to replace PHP's str_replace in C.
The previous code was only replacing one occurrence of substr which might be sufficient in most cases... but will not do the job when the pattern appears more than once within the original string.
This new piece of code will replace ALL occurrences of substring by the replacement pattern.
Bookmark/Search this post with: