Click to See Complete Forum and Search --> : C Function for replacing strings


q6z4k
07-24-2005, 04:30 PM
Hi!
I searched in man string and on the google, but I can't find this function! I need a function, that finds some specific text in string and replaces it with other text. I remember, there was this function that took three arguments, but I don't remember its name! Does anyone know this function? Thanks!

JuiceWVU202
07-24-2005, 06:23 PM
afaik, there is no automatic substring substitution function in c, you'll have to make use of strcmp and strcpy, just make sure the buffer you copy into is big enough to accomidate the new string.