code vault - mystrtokWhat links here?

Code



//##############################################################################
// parse the given string into tokens
// strings within single quotes (') are considered a single token
// if called with string == NULL, it starts where it left off last call
//##############################################################################
char *mystrtok(char *string, char *delimiters)
{
    static char    *work;
    char           *start;
    int             in_quotes;
    
    if (string != NULL) work = string;
    in_quotes = 0;


if (!(*work)) return (NULL); start = work; /* move forward looking for the next character in delimiters */ while (*work) { if (strchr(delimiters, *work) && !in_quotes) break; if (*work == 0x27) in_quotes = in_quotes ? 0 : 1; work++; }; // replace the delimiter with '\0' to signal end of the string if (*work) { *work = '\0'; work++; } return (start); }
code vault - mystrtok
embedded systems - circuit cellar ink links
file formats - PDF - trailer
AutoCAD LISP - ENTMAKE
embedded systems - bacnet - message formats - bacnet-ip
freddy
filename:code vault - mystrtok
filename:code%20vault%20%2D%20mystrtok
last edit:March 26 2009 18:59:10 (5879 days ago)
ct = 1746065554.000000 = April 30 2025 22:12:34
ft = 1238108350.000000 = March 26 2009 18:59:10
dt = 507957204.000000