/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/* a sample program that tokenizes the string, "The summer soldirer,
the sunshine patriot" with spaces and commas being the delimiters.*/
#include <stdio.h>
#include <string.h>

int main() {
    char *token, *str1, *delimit;
    
    str1 = "The summer soldier, the sunshine patriot";
    delimit = " ,"; 
    for(token = strtok(str1, delimit); token!= NULL; 
        token = strtok(NULL, delimit)) {
        printf("token = %s\n", token);
    }
}

