Difference between revisions of "SHIP:Sail:bufCpy"

From Serious Documentation
Jump to: navigation, search
 
Line 11: Line 11:
  
 
== Prototype ==
 
== Prototype ==
<code>{{DataType|Integer}} {{SailFunc|bufCpy}}({{DataType|Node}} srcBuf, {{DataType|Node}} dstBuf[,{{DataType|Integer}} nBytes[, {{DataType|Integer}} srcOffset, {{DataType|Integer}} dstOffset]]);</code>
+
<code>{{DataType|Integer}} {{SailFunc|bufCpy}}({{DataType|Buffer}} srcBuf, {{DataType|Buffer}} dstBuf[,{{DataType|Integer}} nBytes[, {{DataType|Integer}} srcOffset, {{DataType|Integer}} dstOffset]]);</code>
  
 
=== Parameters/Return Value ===
 
=== Parameters/Return Value ===
Line 19: Line 19:
 
! scope="col" style="text-align:left" | Description
 
! scope="col" style="text-align:left" | Description
 
|-
 
|-
|srcBuf||{{DataType|Node}}||Buffer to copy from.
+
|srcBuf||{{DataType|Buffer}}||Buffer to copy from.
 
|-
 
|-
|dstBuf||{{DataType|Node}}||Buffer to copy to.
+
|dstBuf||{{DataType|Buffer}}||Buffer to copy to.
 
|-
 
|-
 
|nBytes||{{DataType|Integer}}||Number of bytes to copy. All if omitted.
 
|nBytes||{{DataType|Integer}}||Number of bytes to copy. All if omitted.
Line 35: Line 35:
  
 
== Detailed Description ==
 
== Detailed Description ==
Copies a buffer to another buffer variable. Can be supplied offsets into the source and destination buffers, and number of bytes if the user wants a partial copy or certain elements.
+
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.
  
  

Latest revision as of 09:16, 12 October 2016

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