Function name : strtok
Header file : <string.h>
Function prototype : char *strtok(char *str1, const char *str2);
Function : Decompose a string using the specified delimiter
Parameters : char *str1 is the string to be decomposed
const char *str2 is the delimiter string
Return value : Returns the next divided string pointer, or NULL if there is no way to separate it.
Note : 1. The function of the function is to decompose the string. The so-called decomposition means that no new string is generated, but the delimiter is changed to '/0' at the position where the delimiter first appears in the content pointed to by s, so the first time Return the first substring with strtok()
2. After the first substring extraction is completed, continue to extract the source string s. The first parameter of strtok should be assigned to the subsequent (second, third,...nth) calls. Is the empty value NULL (indicates that the function continues to decompose the string from the position implicitly saved in the previous call; for the previous call, a this pointer is used to point to the next bit of the delimiter before the end of the first call)
3. When this pointer points to "