repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
select: overhaul for time64
[musl.git]
/
src
/
string
/
wcsncpy.c
blob
4bede04d251e017e4f62fa67c3e0176f2905545c
1
#include <wchar.h>
2
3
wchar_t
*
wcsncpy
(
wchar_t
*
restrict d
,
const wchar_t
*
restrict s
,
size_t
n
)
4
{
5
wchar_t
*
a
=
d
;
6
while
(
n
&& *
s
)
n
--, *
d
++ = *
s
++;
7
wmemset
(
d
,
0
,
n
);
8
return
a
;
9
}