strtok.inc problems
#1

Can anyone find the link for it? I can't find it anywhere.. Unless I'm blind...

Thanks..
Reply
#2

PHP код:
// This function is deprecated and use of it should be avoided where possible.
// Better alternatives like sscanf are available for you to use.
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;

Reply
#3

Thanks man.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)