bdelete
bdelete — deletes a number of bytes from a buffer.
bdelete (buffer, position, length?)
bufferA buffer.
positionThe position of the first byte to delete. A number between
0 and the length of the buffer minus
1.
lengthAn optional number of bytes to delete. The default is
1. A negative number deletes all bytes to
the end. A value of 0 does nothing.
The number contained at the specified position in
the buffer, or nil if the
buffer is undefined at the given
position.
This function deletes a specified number of bytes from a raw memory buffer. The buffer length does not change as a result of this function. A zero character is placed at the empty position at the end of the buffer, then the buffer is collapsed.
Gamma>y = buffer (101, 102, 103, 104);#{efgh}Gamma>bdelete(y,1,2);102Gamma>y;#{eh\0h}Gamma>