This commit is contained in:
David Anderson 2006-09-10 05:16:26 +00:00
parent 02fb807a0b
commit 1b9ef4d268

View File

@ -221,11 +221,15 @@ stock remove_filepath(szFilePath[], szFile[], pMax)
stock replace_all(string[], len, what[], with[]) stock replace_all(string[], len, what[], with[])
{ {
new withlen, charnum = 0; new withlen, charnum = 0;
new total = 0;
withlen = strlen(with); withlen = strlen(with);
while (replace(string[charnum], len, what, with) != 0) while (replace(string[charnum], len, what, with) != 0)
{ {
charnum += contain(string[charnum], with) + withlen; charnum += contain(string[charnum], with) + withlen;
total++;
} }
return total;
} }