05.05.2012, 15:14
Quote:
Cant it be improved if we leave strcat out and pass the address directly to strfind ?
|
Btw, using pointers.inc, this function could be as simple as:
pawn Code:
stock strdel_words(string[], ...) {
new pos = 0, len;
for (new i = numargs() - 1; i > 0; i--) {
len = strlen(@A[i]);
while (-1 != (pos = strfind(string, @A[i], true)))
strdel(string, pos, pos + len);
}
}