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. Syntax
bufferVar.putString(string)
|
|
string |
The string literal to be placed into the Buffer object, or the string variable whose value is to be placed into the Buffer object |
Usage
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, add the following: buf1.putString("Hello"); // Put the string into the buffer buf1.putValue( 0 ); // Add terminating null byte
Example
The following example places the string language in the buffer exclamation and displays the modified contents of explanation, which is the string, "I enjoy coding with Siebel eScript." function eScript_Click () { var exclamation = new Buffer("I enjoy coding with . . ."); var language = "Siebel eScript."; exclamation.cursor = 20; exclamation.putString(language); TheApplication().RaiseErrorText(exclamation); }
See Also
getString() Method
|