Files
RedBear-OS/tests/string/strtok.c
T
Timothy Bess 898cf98ccc * fix test case a bit
* remove unnecessary cast
2018-03-17 03:06:59 -04:00

18 lines
468 B
C

#include <string.h>
#include <stdio.h>
int main(int argc, char* argv[]) {
char source[] = "I'd just like to interject for a moment. What you're referring to as Linux, "
"is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux.\n";
char* token = strtok(source, " ");
while (token) {
printf("%s", token);
if (token = strtok(NULL, " ")) {
printf("_");
}
}
return 0;
}