Commit | Line | Data |
---|---|---|
21c4e167 H |
1 | #include <stdio.h> |
2 | #include <string.h> | |
3 | ||
4 | int main(int argc, char *argv[]) { | |
5 | char text[] = "Hello \ndolly \r\nomg!\tHow are you?\n \n\t"; | |
6 | puts(text); | |
7 | puts("----------------------------"); | |
8 | ||
9 | char *str; | |
10 | char delim[] = " \r\n\t"; | |
11 | for(str = strtok(text, delim);str != NULL;str = strtok(NULL, delim)) { | |
12 | printf("[%s]\n", str); | |
13 | } | |
14 | } |