TutBufDeleteRange


Name

TutBufDeleteRange — delete a block of data from a buffer

Synopsis

T_BUF TutBufDeleteRange(buf, begin, end) 
T_BUF buf; 
T_INT4 begin; 
T_INT4 end; 

Arguments

buf — T_BUF object from which to delete the data

begin — start of the block to delete

end — end of the block to delete

Return Values

TRUE if successful, FALSE otherwise.

Diagnostics

None

Description

TutBufDeleteRange deletes a block of data from a buffer, starting at begin. All data starting at end (or the end of the buffer if end is -1) is shifted left to fill the hole. If either begin or end are outside of the range of the buffer, this function fails. This function also fails if end is before begin.

Caution

None

See Also

TutBufCreate, TutBufDestroy, TutBufAppendRange

Examples

This example deletes 12 bytes of data from a buffer, starting at byte 6:

T_BOOL status; 
status = TutBufDeleteRange(buf, 6, 18); 
if (status == FALSE) { 
  /* error */ 
} 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com