This subroutine will delete (cut out) the remaining part of the current line, ie. it will erase data from the specified buffer starting at the current buffer position (which may be anywhere in the line) and continuing until it finds the next line break (according to the active line endings logic of the buffer) or until the buffer end, if no more line breaks exist. The erase does include the found line break (if any).
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 (ie. the next line's start will be on that position then). Hence, sequential deleting is easily possible with subsequent calls.
SYNTAX:
DeleteBufLine buf$()
INPUTS:
buf$() (STRING array)
- This is the array of any existing and initialized buffer, from which you wanna erase data.
NOTES:
- Depending on the current buffer position, this routine will not necessarily erase the entire line as it is present in the buffer.
- To make sure you erase a line entirely, you may want to move the current buffer position to the start of line before calling this subroutine, if this is not guaranteed automatically (eg. by deleting lines sequentially).
- You may move the current buffer position to the line start using the function SeekBuf() with an displacement of zero (0) and mode SBM_LineStart.