Converts a value to a string.

toString(any_value [, encoding]) → returns String

Argument Reference for the toString function


Required: Yes
Value to convert to a string


Required: No
Default: The default value is the encoding of the page on which the function is called.
The character encoding (character set) of the string. Values:
  • utf-8
  • iso-8859-1
  • windows-1252
  • us-ascii
  • shift_jis
  • iso-2022-jp
  • euc-jp
  • euc-kr
  • big5
  • euc-cn
  • utf-16

Examples sample code invoking the toString function

Script Syntax

base64Value = toBase64( "stringValue" ); 
 binaryValue = toBinary( base64Value ); 
 stringValue = toString( binaryValue ); 

Expected Result: Expected Result: stringValue

Fork me on GitHub