There are not such functions in the standard libraries.
You can easily roll your own using strchr
for replacing one single char, or strstr
to replace a substring (the latter will be slightly more complex).
int replacechar(char *str, char orig, char rep) {
char *ix = str;
int n = 0;
while((ix = strchr(ix, orig)) != NULL) {
*ix++ = rep;
n++;
}
return n;
}
This one returns the number of chars replaced and is even immune to replacing a char by itself