strtok_r My implementation of strtok_r() Example usage: char str[100] = "hello\nI am a great,\nperson"; char *save = NULL; char *hey = strtok_r(str, '\n', &save); while (hey != NULL) { printf("%s", hey); hey = strtok_r(NULL, '\n', &save); }