How to split a string into tokens in C?
c, split, token
Solution
strtok / strtok_r
char *token;
char *state;
for (token = strtok_r(input, "&", &state);
token != NULL;
token = strtok_r(NULL, "&", &state))
{
...
}
Problem
How to split a string into tokens by `'&'` in C?