Skip to content

Instantly share code, notes, and snippets.

@FurryHead
Created July 13, 2011 20:41
Show Gist options
  • Save FurryHead/1081270 to your computer and use it in GitHub Desktop.
Save FurryHead/1081270 to your computer and use it in GitHub Desktop.
C split/join functions, using strtok_r -- Header
#ifndef SPLIT_JOIN_H
#define SPLIT_JOIN_H
#ifdef __cplusplus
extern "C" {
#endif
int str_split(const char *src, const char* delim, char*** dest);
char *str_join(char** items, int num_items, const char* delim);
#ifdef __cplusplus
}
#endif
#endif /* SPLIT_JOIN_H */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment