In C how can I separate a char array by a delimiter? Or is it better to manipulate a string? What are some good C char manipulation functions?
One option is strtok
example:
char name[20]; //pretend name is set to the value "My name"
You want to split it at the space between the two words
split=strtok(name," "); while(split != NULL) { word=split; split=strtok(NULL," "); }