mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 23:55:57 -05:00
14 lines
291 B
C
14 lines
291 B
C
|
/* Compliments of Jay Freeman <saurik@saurik.com> */
|
||
|
|
||
|
#include <string.h>
|
||
|
|
||
|
char *strsep(char **stringp, const char *delim) {
|
||
|
char *ret = *stringp;
|
||
|
if (ret == NULL) return(NULL); /* grrr */
|
||
|
if ((*stringp = strpbrk(*stringp, delim)) != NULL) {
|
||
|
*((*stringp)++) = '\0';
|
||
|
}
|
||
|
return(ret);
|
||
|
}
|
||
|
|