
#include	<stdio.h>
#include	<string.h>


/* ’uŠ· */
int		MU_replace(char *str,char *before,char *after)
{
	int		count=0;
	char	*p;
	char	buf[512];
	
	strcpy(buf,"");
	
	p=strstr(str,before);
	while(p!=NULL)
	{
		*p='\0';
		strcpy(buf,p+strlen(before));
		strcat(str,after);
		strcat(str,buf);
		p=strstr(p+strlen(after),before);
		count++;
	}
	
	return(count);
}

