This subroutine will copy the entire contents of the given source buffer to the destination buffer. The destination buffer does not need to be initialized yet, as this call includes the required init procedure. However, it will not hurt, if the destination buffer is already initialized or even used and filled with data. But note, that in this case all previous content of the destination buffer is discarded and replaced by the copied data.
The copy will also include all markers and find data, as well as the current buffer position and the active line endings logic of the source buffer. Hence, you get an exact clone of the source buffer.
SYNTAX:
CopyBuf buf$(), destBuf$()
INPUTS:
buf$() (STRING array)
- This is the array of any existing and initialized buffer, which you want to copy (source buffer). The buffer may still be empty, which would create an empty copy then.
destBuf$() (STRING array)
- This must be a 1-dimensional REDIMed (dynamic) STRING array of at least one element, it will be initialized and filled by this routine to become an clone of the given source buffer. In alternative it can also be the array of any existing buffer (destination buffer).