65int replaceString(
char *t,
char *s,
char *orig,
char *repl,
long count_limit,
long here) {
73 while ((count_limit < 0 || count < count_limit) && (ptr1 =
str_in(ptr0, orig))) {
74 if (here && ptr1 != ptr0)
81 ptr0 = ptr1 + strlen(orig);
int replaceString(char *t, char *s, char *orig, char *repl, long count_limit, long here)
Replace occurrences of one string with another string with additional options.
int replace_stringn(char *t, char *s, char *orig, char *repl, long count_limit)
Replace a limited number of occurrences of one string with another string.
int replace_string(char *t, char *s, char *orig, char *repl)
Replace all occurrences of one string with another string.
char * str_in(char *s, char *t)
Finds the first occurrence of the substring t in the string s.