The strsep() function gets the next token from string *stringp, where tokens are strings separated by characters from delim.
The function strsep() writes nulls into the string at *stringp to separate tokens. On return, if there are more tokens, then *stringp points past the last null written. Contiguous delimiter characters are indicated when strsep() returns a pointer to a null character (that is, a character with the value '\0'). When there are no remaining tokens, strsep() returns a null pointer.
The string delim need not remain constant from call to call.
This function is intended to replace strtok(). It offers improved handling of contiguous delimiter characters.