Siebel eScript Language Reference > Siebel eScript Commands > Buffer Object Methods >

putString() Method

This method puts a string into a buffer object at the current cursor position.





The string literal to be placed into the buffer object, or the string variable whose value is to be placed into the buffer object


If the unicode flag is set within the buffer object, then the string is put into the buffer object as a Unicode string; otherwise, it is put into the buffer object 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.

A terminating null byte is not added at end of the string.

To put a null terminated string into the buffer object, do the following:

buf1.putString("Hello");   // Put the string into the buffer
buf1.putValue( 0 );         // Add terminating null byte


The following example places the string language in the buffer exclamation and displays the modified contents of explanation, which is the string, "I love coding with Siebel eScript."

function eScript_Click ()
   var exclamation = new Buffer("I love coding with . . .");
   var language = "Siebel eScript.";
   exclamation.cursor = 19;

See Also

getString() Method

Siebel eScript Language Reference