Main Page | Data Structures | File List | Globals

libgu/gu_strsep.c File Reference

string parser More...

#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


Detailed Description

string parser


Function Documentation

char* gu_strsep char **  stringp,
const char *  delim
 

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; }


Generated on Fri Feb 20 15:17:52 2004 for PPR Libraries by doxygen 1.3.5