This subroutine will delete (cut out) the requested amount of subsequent bytes, ie. it will erase data from the specified buffer starting at the current buffer position and continuing until the requested amount of bytes was erased or until the buffer end, whichever case is first.
The call will also recalculate all markers to maintain its respective positions. Any markers formerly set on the deleted data will be invalidated. The current buffer position remains unchanged after the call, as the following data (if any) will move up to fill the gap. Hence, sequential deleting is easily possible with subsequent calls.
SYNTAX:
DeleteBufRawData buf$(), size&
INPUTS:
buf$() (STRING array)
- This is the array of any existing and initialized buffer, from which you wanna erase data.
size& (LONG)
- The amount of bytes to erase from the buffer.
- Note there's an intended side effect on this argument. If the erase reaches the buffer end, then size& is adjusted to the remaining amount of bytes.
NOTES:
- If required, the following functions may be used to set the current buffer position in advance:
- SeekBuf() with an appropriate displacement and seek mode.
- GotoBufMark() to restore to an earlier marked position.
- FindBufFwd() or FindBufRev() to move to the next or previous occurrence of the designated find data (starting from the current position).