TutBufAppendRange append the contents of a range of one buffer into another
dest
T_BUF object to receive the data
src
T_BUF object to provide the data
begin
start of the block to copy
end
end of the block to copy
Pointer into the destination buffer where the data was copied if successful, NULL
otherwise.
None
TutBufAppendRange copies a block of data end
-
begin
bytes long from the source buffer starting at begin
into the destination buffer, appending the data onto the end of the destination buffer. The destination buffer grows, if necessary, to accommodate the data. If the given end
is -1
, then all of the data in the source buffer from begin
to the end of the buffer is copied. If begin
or end
are outside of the range of the source buffer, this function fails.
The returned pointer is only valid until the next call to a buffer operation that may resize the buffer, because the buffer may be moved during a resize.
TutBufCreate, TutBufDestroy, TutBufAppendBuf
This example copies 8 bytes from the buffer src
starting at byte 3 to the buffer dest
:
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |