#include
#include
#include
#define MAXLEN 100
int ReplaceStr(char ****c, char *sSubStr, char *sReplaceStr)
{
int StringLen;
char caNewString[MAXLEN];
char *FindPos = strstr(***c, sSubStr);
if( (!FindPos) || (!sSubStr) )
return -1;
while( FindPos )
{
memset(caNewString, 0, sizeof(caNewString));
StringLen = FindPos - ***c;
strncpy(caNewString, ***c, StringLen);
strcat(caNewString, sReplaceStr);
strcat(caNewString, FindPos + strlen(sSubStr));
strcpy(***c, caNewString);
FindPos = strstr(***c, sSubStr);
}
return 0;
}