[PEDIDO] Include com a funзгo strtok
#2

pawn Код:
strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }

    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}

Isso?
Reply


Messages In This Thread
[PEDIDO] Include com a funзгo strtok - by douglasmonteiro - 01.06.2011, 03:05
Re: [PEDIDO] Include com a funзгo strtok - by ViniBorn - 01.06.2011, 03:18
Re: [PEDIDO] Include com a funзгo strtok - by douglasmonteiro - 01.06.2011, 15:22
Re: [PEDIDO] Include com a funзгo strtok - by TiagoPS - 01.06.2011, 20:27

Forum Jump:


Users browsing this thread: 1 Guest(s)