Using too much CPU...Need help :(
#7

there is a much better strtok - its double so fast how the from cutter :S
pawn Код:
stock strtok(const string[], &index, const seperator[] = " ")
{
    const size = 30;
    new
        idx = strfind(string, seperator, false, index),
        result[size];
    if(idx == -1)
    {
        if((idx = strlen(string)) > index)
            strmid(result, string, index, idx, size),
            index = idx;
    }
    else if(idx > (index + size - 1))
            strmid(result, string, index, (idx = index + size - 1), size),
            index = idx;
    else    strmid(result, string, index, idx, size),
            index = idx + 1;
    return result;
}
but ... look ****** post
Reply


Messages In This Thread
Using too much CPU...Need help :( - by Outbreak - 23.02.2009, 13:59
Re: Using too much CPU...Need help :( - by KnooL - 23.02.2009, 14:27
Re: Using too much CPU...Need help :( - by Nero_3D - 23.02.2009, 14:31
Re: Using too much CPU...Need help :( - by Outbreak - 23.02.2009, 14:53
Re: Using too much CPU...Need help :( - by x-cutter - 23.02.2009, 15:01
Re: Using too much CPU...Need help :( - by Outbreak - 23.02.2009, 15:41
Re: Using too much CPU...Need help :( - by Nero_3D - 23.02.2009, 16:20
Re: Using too much CPU...Need help :( - by Outbreak - 23.02.2009, 16:28
Re: Using too much CPU...Need help :( - by Joe Staff - 23.02.2009, 16:49
Re: Using too much CPU...Need help :( - by Outbreak - 23.02.2009, 17:50

Forum Jump:


Users browsing this thread: 1 Guest(s)