X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fwchar%2Fwcscpy.c;fp=functions%2Fwchar%2Fwcscpy.c;h=02394ee51c9402c59fb431eee63de2092c5b8825;hb=219271fd548949abce8bd75c34dd42e519418fc4;hp=0000000000000000000000000000000000000000;hpb=1cc4363093c919f79eafac209bb5c41548d3f88f;p=pdclib diff --git a/functions/wchar/wcscpy.c b/functions/wchar/wcscpy.c new file mode 100644 index 0000000..02394ee --- /dev/null +++ b/functions/wchar/wcscpy.c @@ -0,0 +1,33 @@ +/* wchar_t * wcscpy( wchar_t restrict *, const wchar_t restrict * ); + + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ + +#include + +#ifndef REGTEST + +wchar_t *wcscpy( wchar_t * _PDCLIB_restrict dest, + const wchar_t * _PDCLIB_restrict src) +{ + wchar_t * rv = dest; + while(*src) { + *(dest++) = *(src++); + } + + return rv; +} + + +#endif + +#ifdef TEST +#include <_PDCLIB_test.h> + +int main( void ) +{ + return TEST_RESULTS; +} + +#endif