![MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Скачать руководство пользователя страница 571](http://html1.mh-extra.com/html/macromedia/coldfusion-4-5-cfml-language/coldfusion-4-5-cfml-language_reference_3287257571.webp)
Chapter 2: ColdFusion Functions
547
ToString
Attempts to convert a value of any type, including a binary value, into a string.
Syntax
ToString
(
any_value)
any_value
The value that is to be converted into a string.
Usage
If ToString cannot convert the value into a string, it throws an exception. All simple
values can be converted into a string, even binary values that do not contain byte zero
can be converted.
Examples
<!--- This example shows the use of ToBase64, ToBinary and ToString --->
<HTML>
<HEAD>
<TITLE>
ToString Example
</TITLE>
</HEAD>
<BODY BGCOLOR=silver>
<H3>ToString Example</H3>
<!----------------------------------------------------------------------
Initialize data.
----------------------------------------------------------------------->
<CFSET charData ="">
<!----------------------------------------------------------------------
Create a string of all ASCII characters (32-255) and concatenate them
together.
----------------------------------------------------------------------->
<CFLOOP index="data" from="32" to="255">
<CFSET ch=chr(data)>
<CFSET charData=charData & ch>
</CFLOOP>
<P>
The following string is the concatenation of all characters (32 to 255)
from the ASCII table.<BR>
<CFOUTPUT>#charData#</CFOUTPUT>
</P>
<!----------------------------------------------------------------------
Create a Base 64 representation of this string.
----------------------------------------------------------------------->
<CFSET data64=toBase64(#charData#)>
<P>
The following string is the Base 64 representation of the original
string.<BR>
<CFOUTPUT>#data64#</CFOUTPUT>
</P>
Содержание COLDFUSION 4.5-CFML LANGUAGE
Страница 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Страница 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Страница 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Страница 296: ...272 CFMLLanguageReference INPUT TYPE text NAME number2 BR INPUT TYPE submit NAME submit VALUE Add FORM BODY HTML...
Страница 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Страница 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Страница 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Страница 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Страница 557: ...Chapter 2 ColdFusion Functions 533 P CFOUTPUT Value i is employee keysToStruct i CFOUTPUT P CFLOOP CFIF BODY HTML...
Страница 584: ...560 CFMLLanguageReference...
Страница 594: ...570 CFMLLanguageReference...