Sign in
android
/
platform
/
external
/
musl
/
refs/heads/android13-d4-release
/
.
/
src
/
string
/
strsep.c
blob: cb37c32eb852b9318c40d1feb5f9259660f13b71 [
file
] [
log
] [
blame
] [
edit
]
#define
_GNU_SOURCE
#include
<string.h>
char
*
strsep
(
char
**
str
,
const
char
*
sep
)
{
char
*
s
=
*
str
,
*
end
;
if
(!
s
)
return
NULL
;
end
=
s
+
strcspn
(
s
,
sep
);
if
(*
end
)
*
end
++
=
0
;
else
end
=
0
;
*
str
=
end
;
return
s
;
}