Sign in
googlers
/
maze
/
klibc
/
d02da14f1a2841840d647fadfd3ad3915d850367
/
.
/
klibc
/
strsep.c
blob: 58a7a07773b4f0d23dc7bd38192ad40a6c50a9e0 [
file
] [
log
] [
blame
]
/*
* strsep.c
*/
#include
<string.h>
char
*
strsep
(
char
**
stringp
,
const
char
*
delim
)
{
char
*
s
=
*
stringp
;
char
*
e
;
if
(
!
s
)
return
NULL
;
e
=
strpbrk
(
s
,
delim
);
if
(
e
)
*
e
++
=
'\0'
;
*
stringp
=
e
;
return
s
;
}