Sign in
fuchsia
/
zircon
/
/
13ee3dc5e4c46bf127977ad28645c47442ec517d
/
.
/
third_party
/
ulib
/
musl
/
src
/
string
/
wcsdup.c
blob: 161b0f4476577dc4187a504942fc457945748445 [
file
] [
log
] [
blame
]
#include
"libc.h"
#include
<stdlib.h>
#include
<wchar.h>
wchar_t
*
wcsdup
(
const
wchar_t
*
s
)
{
size_t
l
=
wcslen
(
s
);
wchar_t
*
d
=
malloc
((
l
+
1
)
*
sizeof
(
wchar_t
));
if
(!
d
)
return
NULL
;
return
wmemcpy
(
d
,
s
,
l
+
1
);
}