contents   index   previous   next



Buffer cursor

syntax:

buffer.cursor

description:

The current position within a buffer. This value is always between 0 and .size. It can be assigned to as well. If a user attempts to move the cursor beyond the end of a buffer, then the buffer is extended to accommodate the new position, and filled with NULL, "\0", bytes. If a user attempts to set the cursor to less than 0, then it is set to the beginning of the buffer, to position 0.

 

see:

Buffer bigEndian, Buffer size

 

example:

var b = new Buffer("@ABCDE");

// now b.cursor == 0

b.cursor = 3;

Screen.writeln(b.getValue()); // 67 - ASCII for "C"

 


Buffer size