#include <stdio.h>
#include <string.h>
int main(void) {
char csv[] = "a,b,c";
for (char *tok = strtok(csv, ","); tok != nullptr; tok = strtok(nullptr, ",")) {
printf("%s\n", tok);
}
return 0;
}split a mutable buffer on delimiters