Cutting a chain by a criterion.

A sample cutting a chain using customized separators.

strtok

See version :

Pas de dépendances

Download :

#include <stdio.h>
#include <string.h>

int main()
{
    char* sub;
    char chaine[] = "Bonjour, comment allez vous ? Moi impec !";
    sub = strtok(chaine,",?! ");
    while(sub)
    {
        printf("%s\n",sub);
        sub = strtok(NULL,",?! ");
    }
    return 0;
}



Explanations

	No explanations yet.