wcsdup.c\string\src - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/string/wcsdup.c
blob: f398e8091c382e7616def68d663a3bf8d33448d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#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);
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月06日 09:28:19 +0000

AltStyle によって変換されたページ (->オリジナル) /