What are the differences between strtok and strsep in C
问题 Could someone explain me what differences there are between strtok() and strsep() ? What are the advantages and disadvantages of them? And why would I pick one over the other one. 回答1: From The GNU C Library manual - Finding Tokens in a String: One difference between strsep and strtok_r is that if the input string contains more than one character from delimiter in a row strsep returns an empty string for each pair of characters from delimiter. This means that a program normally should test