Name

ToString

Synopsis

                  
                  
                  
                  ToString( )

Converts any datatype, including binary, to a string. If value can’t be converted, an exception is thrown. Example:

<cfset MyString="Have a nice day!">
<cfset Base64String = ToBase64(MyString)>
<cfset BinaryString = ToBinary(Base64String)>
<cfset BackToString = ToString(BinaryString)>
<cfoutput>
MyString: #MyString#<br>
Base64String: #Base64String#<br>
BackToString: #BackToString#<br>
</cfoutput>

Get Programming ColdFusion MX, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.