Coding.Debuntu.Org

Syndicate content
Coding.Debuntu provides sources bit that can be reused to develop your own application. Source files are attached to the tutorials so you can easily reused and modify the tutorial.
Updated: 35 min 11 sec ago

C: implementing str_replace to replace all occurrences of substring

Mon, 05/24/2010 - 19:57

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:

read more

Categories: Debuntu Network