Truncate string by delimiter: how to use strtok : String Split « String « C / ANSI-C
Truncate string by delimiter: how to use strtok #include #include int main () { char str[] ="This is a sample string, just testing."; char *p; printf ("Split \"%s\" in tokens:\n", str); p = strtok (str," "); while (p != NULL) { printf ("%s...