--- /dev/null
+/* wmemcpy( wchar_t *, const wchar_t *, size_t )\r
+\r
+ This file is part of the Public Domain C Library (PDCLib).\r
+ Permission is granted to use, modify, and / or redistribute at will.\r
+*/\r
+\r
+#include <wchar.h>\r
+\r
+#ifndef REGTEST\r
+\r
+wchar_t * wmemcpy( wchar_t * _PDCLIB_restrict dest, \r
+ const wchar_t * _PDCLIB_restrict src, \r
+ size_t n )\r
+{\r
+ wchar_t* rv = dest;\r
+ while ( n-- )\r
+ {\r
+ *dest++ = *src++;\r
+ }\r
+ return rv;\r
+}\r
+\r
+#endif\r
+\r
+#ifdef TEST\r
+#include <_PDCLIB_test.h>\r
+\r
+int main( void )\r
+{\r
+ wchar_t s[] = L"xxxxxxxxxxx";\r
+ TESTCASE( wmemcpy( s, wabcde, 6 ) == s );\r
+ TESTCASE( s[4] == L'e' );\r
+ TESTCASE( s[5] == L'\0' );\r
+ TESTCASE( wmemcpy( s + 5, wabcde, 5 ) == s + 5 );\r
+ TESTCASE( s[9] == L'e' );\r
+ TESTCASE( s[10] == L'x' );\r
+ return TEST_RESULTS;\r
+}\r
+#endif\r