aboutsummaryrefslogtreecommitdiff
path: root/tst/strtok.c
blob: a25dd7cc37ce57d2e1cba73f41026787c4825591 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
	char msg[] = "toto tata titi";
	char* ptr;
	char* p;

	p = msg;

	do
	{
		ptr = strchr(p, ' ');
		ptr++;
		printf (":%s:\n", ptr);
		p++;
	}
	while (*p);

	return 0;
}