5 /* memcpy( void *, const void *, size_t )
7 This file is part of the Public Domain C Library (PDCLib).
8 Permission is granted to use, modify, and / or redistribute at will.
11 #include <_PDCLIB_aux.h>
16 void * memcpy( void * _PDCLIB_restrict s1, const void * _PDCLIB_restrict s2, size_t n )
18 char * dest = (char *) s1;
19 const char * src = (const char *) s2;
30 #include <_PDCLIB_test.h>
34 char s[] = "xxxxxxxxxxx";
36 TESTCASE( memcpy( s, abcde, 6 ) == s );
37 TESTCASE( s[4] == 'e' );
38 TESTCASE( s[5] == '\0' );
39 TESTCASE( memcpy( s + 5, abcde, 5 ) == s + 5 );
40 TESTCASE( s[9] == 'e' );
41 TESTCASE( s[10] == 'x' );