diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | tst/strtok.c | 23 |
2 files changed, 29 insertions, 0 deletions
@@ -1,3 +1,9 @@ +beber from rampa : 18/10/05 17:14:12 +add a test + +File changes : +A tst/strtok.c + beber from rampa : 18/10/05 12:51:14 link to local lib (mine) diff --git a/tst/strtok.c b/tst/strtok.c new file mode 100644 index 0000000..a25dd7c --- /dev/null +++ b/tst/strtok.c @@ -0,0 +1,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; +} |