2 ** Copyright 2011, Oliver Tappe, zooey@hirschkaefer.de. All rights reserved.
3 ** Distributed under the terms of the Haiku License.
6 #include <wchar_private.h>
10 __wcpncpy(wchar_t* dest
, const wchar_t* src
, size_t n
)
12 const wchar_t* srcEnd
= src
+ n
;
13 wchar_t* destEnd
= dest
+ n
;
15 while (src
< srcEnd
&& *src
!= L
'\0')
19 while (--destEnd
>= dest
)
27 B_DEFINE_WEAK_ALIAS(__wcpncpy
, wcpncpy
);