strval
#8

Quote:
Originally Posted by LarzI
Посмотреть сообщение
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;
}
or just use y_faster_everything_because_we_are_obsessed_with_s peed_plugin
Reply


Messages In This Thread
strval - by Fergy - 19.03.2013, 20:53
Re: strval - by ReVo_ - 19.03.2013, 20:54
Re: strval - by Bakr - 19.03.2013, 20:55
Re: strval - by Fergy - 19.03.2013, 20:55
Re: strval - by Jstylezzz - 19.03.2013, 20:57
Re: strval - by Fergy - 19.03.2013, 21:01
Re: strval - by LarzI - 19.03.2013, 22:01
Re: strval - by mastermax7777 - 19.03.2013, 22:03

Forum Jump:


Users browsing this thread: 1 Guest(s)