mirror of https://git.musl-libc.org/git/musl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
214 B
11 lines
214 B
#include <stdlib.h>
|
|
#include <wchar.h>
|
|
#include "libc.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);
|
|
}
|
|
|