25.11.2011, 05:29
pawn Code:
stock RemoveTags(name[])
{
new i, len = strlen(name), fpos = -1, lpos = -1;
for (i = 0; i < len; i++)
{
if (name[i] == '[')
{
fpos = i;
}
else if (name[i] == ']')
{
lpos = i;
}
}
if ( fpos == -1 || lpos == -1 ) return name;
strdel(name, fpos, lpos);
return name;
}