xxxxxxxxxx
Searching for Word Separators
The following example searches for tokens separated by <space> characters.
#include <string.h>
char *token;
char line[] = "LINE TO BE SEPARATED";
char *search = " ";
/* Token will point to "LINE". */
token = strtok(line, search);
/* Token will point to "TO". */
token = strtok(NULL, search);