#include "before_system.h"
#include <string.h>
#include "gu.h"
#include "global_defines.h"
Functions | |
char * | gu_strsep (char **stringp, const char *delim) |
extract fields from a string |
|
extract fields from a string This is intended as a clone of BSD strsep(). BSD strsep() differs from ANSI strtok() in that it can handle empty fields and in that it has no static storage, so it is thread safe. p = line; if(!(f1 = gu_strsep(&p, ":")) || !(f2 = gu_strsep(&p, ":"))) { error(_("Not enough fields in \"s\" line %d"), filename, linenum); return -1; } |