19.03.2013, 22:01
I recommend using the version from y_utils as it's about 3 times as fast (Benchmarked with 10000 loops, your version took 9ms while this one only 3ms - the difference is pretty unnoticable, but still):
pawn Код:
stock isnumeric(str[])
{
new
ch,
i;
while ((ch = str[i++])) if (!('0' <= ch <= '9')) return 0;
return 1;
}