Copy byte buffer
memcpy( dest[], source[], index, length )
Copy the source
string to dest
, starting at the index
byte in dest, and counting length
bytes.
dest | destination buffer |
source | string to be copied |
index | offset in source |
length | number of bytes to copy |
Returns number of bytes copied.
new s1{20}; new s2{20}; strcopy(s1, "ABCdef"); memcpy(s2, s1, 3, 3); // s2 now contains "def" - NOTE that no terminating NULL character is copied