Public feed
#892781
#include <stdio.h>#include <string.h>#include <unistd.h>int main(int argc, char *argv[]) { const char *delims = " []"; char *buf; char *x, *tok; buf = (char *) malloc(256); strcpy(buf, "this is a [test ]boo hehe"); x = buf; do { tok = strsep(&x, delims); printf("tok:[%s]\n", tok); } while (x != NULL); return 0;}