SHIP:Sail:bufCpy

From Serious Documentation
Jump to: navigation, search
Function Returns Introduced Description
bufCpy Integer v5.1.0 Copies from one buffer to another.

See Also:

Prototype

Integer bufCpy(Buffer srcBuf, Buffer dstBuf[,Integer nBytes[, Integer srcOffset, Integer dstOffset]]);

Parameters/Return Value

Parameter Data Type Description
srcBuf Buffer Buffer to copy from.
dstBuf Buffer Buffer to copy to.
nBytes Integer Number of bytes to copy. All if omitted.
srcOffset Integer Offset into source buffer.
dstOffset Integer Offset into destination buffer.
Return Integer number of bytes copied.

Detailed Description

Copies a buffer's data to another buffer. Can be supplied offsets into the source and destination buffers, and number of bytes if the user wants a partial copy or certain elements.


Examples

Example Result Notes
bufCpy(infoBuf, newBuf, 30); 30
bufCpy(splashBuf, newBuf); 100
bufCpy(cancelBuf, newBuf, 50, 12, 32); 50