aboutsummaryrefslogtreecommitdiff
path: root/challenge-209/duncan-c-white/C/csvsplit.h
blob: 964554937998b994ff3e13936185657e95b0bcf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//
// csvsplit.h: simple CSV splitting (csvForeach), useful utility functions
//	       Now one function that strdup()s it's strings, another that
//	       modifies them in place.
//
// (C) Duncan C. White, May 2017-March 2023

// a csv foreach callback function takes
// a char * (the csv value split out)
// and a void * (an extra value).

typedef void (*csvforeachcb)( char *, void * );

extern void csvForeach( char * csvstring, csvforeachcb cb, void * extra );
extern void csvForeachstrdup( char * csvstring, csvforeachcb cb, void * extra );