Siebel eScript Language Reference > Siebel eScript Commands > The Global Object >

ToString() Method


This method converts its parameter to a string.

Syntax

ToString(value)

Parameter
Description
value
The value to be converted to a string

Returns

A value in the form of a Unicode string, the contents of which depends on value's original data type, according to the following table:

Data Type
Returns
Boolean
"false" if value is false; otherwise, "true"
null
The string "null"
number
If value is NaN, "NaN". If value is +0 or -0, "0"; if Infinity, "Infinity"; if a number, a string representing the number
object
The string "[object Object]"
string
value
undefined
The string "undefined"

Usage

This method converts its parameter to a Unicode string, the contents of which depend on value's original data type.

CAUTION:  The ToString() function is unique to Siebel eScript. Avoid using it in a script that may be used with a JavaScript interpreter that does not support it.

Example

For an example, read eval() Method.

See Also

ToBuffer() Method and ToBytes() Method


 Siebel eScript Language Reference 
 Published: 18 April 2003