Siebel eScript Language Reference > Siebel eScript Commands > Buffer Object Methods >
This method returns a new Buffer object consisting of the data between two specified positions.
The cursor position at which the new Buffer object should begin
The cursor position at which the new Buffer object should end
A new Buffer object consisting of the data in bufferVar between the beginning and end positions.
If beginning is less than 0, then it is treated as 0, the start of the buffer.
If end is beyond the end of the buffer, then the new subbuffer is extended with null bytes, but the original buffer is not altered. The unicode and bigEndian flags are duplicated in the new buffer.
The length of the new buffer is set to end - beginning. If the cursor in the old buffer is between beginning and end, then it is converted to a new relative position in the new buffer. If the cursor was before beginning, it is set to 0 in the new buffer; if it was past end, it is set to the end of the new buffer.
This code fragment creates the new buffer
language and displays its contents—the string
var loveIt= new Buffer("I love coding with Siebel eScript!");
var language = loveIt.subBuffer(19, (loveIt.size - 1))