1 /* wchar_t * wcsncpy( wchar_t *, const wchar_t * , size_t );
3 This file is part of the Public Domain C Library (PDCLib).
4 Permission is granted to use, modify, and / or redistribute at will.
11 wchar_t *wcsncpy( wchar_t * _PDCLIB_restrict s1,
12 const wchar_t * _PDCLIB_restrict s2,
16 while ( ( n > 0 ) && ( *s1++ = *s2++ ) )
18 /* Cannot do "n--" in the conditional as size_t is unsigned and we have
19 to check it again for >0 in the next loop below, so we must not risk
24 /* Checking against 1 as we missed the last --n in the loop above. */
36 #include "_PDCLIB_test.h"