contents   index   previous   next



Buffer putString()

syntax:

buffer.putString(string)

where:

string - Any string.

 

return:

void.

 

description:

This method puts a string into the Buffer object at the current cursor position. If the .unicode flag is set within the Buffer object, then the string is put as a unicode string, otherwise it is put as an ASCII string. The cursor is incremented by the length of the string (or twice the length if it is put as a unicode string). Note that terminating null byte is not added at end of the string.

 

example:

// To put a null terminated string,

// the following can be done.

 

   // Put the string into the buffer

foo.putString( "Hello" );

   // Add terminating null byte

foo.putValue( 0 );

 


Buffer putValue()