added replace_all stock (by jtp10181)
This commit is contained in:
parent
1a48ebb345
commit
8196ddd0b3
@ -178,3 +178,18 @@ stock remove_filepath(szFilePath[], szFile[], pMax)
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Replaces a contained string
|
||||||
|
By jtp10181
|
||||||
|
*/
|
||||||
|
stock replace_all(string[], len, what[], with[])
|
||||||
|
{
|
||||||
|
new withlen, charnum = 0;
|
||||||
|
|
||||||
|
withlen = strlen(with);
|
||||||
|
|
||||||
|
while (replace(string[charnum], len, what, with) != 0)
|
||||||
|
{
|
||||||
|
charnum += contain(string[charnum], with) + withlen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user