Try this:
Code:
stock remove_weird_stuff(text[])
{
new i;
new off=0;
new validcnt=0;
for (i = 0; text[i]; ++i)
{
text[i - off] = text[i];
if (text[i] == '\'' || text[i] == '\"' || text[i] == '[' || text[i] == ']' || text[i] == '~')
++off;
else
++validcnt;
}
text[validcnt] = 0;
}
Note that this is untested, I have written it in one minute :X
EDIT: Typo
__________________