Chapter 2: ColdFusion Functions
Reverse
Returns string with reversed order of characters.
See also Left,
Syntax
Reverse( string )
string
String being reversed.
Examples
<!--- This example shows the use of Reverse --->
<HTML>
<HEAD>
<TITLE>
Reverse Example
</TITLE>
</HEAD>
<BODY BGCOLOR=silver>
<H3>Reverse Example</H3>
<P>Reverse returns your string with the positions
of the characters reversed.
<CFIF IsDefined("FORM.myString")>
<CFIF FORM.myString is not "">
<CFELSE>
</CFIF>
</CFIF>
<FORM ACTION="reverse.cfm" METHOD="POST">
<P>Enter a string to be reversed:
<INPUT TYPE="Text" NAME="MyString">
<P><INPUT TYPE="Submit" NAME="">
</FORM>
</BODY>
</HTML>
Mid,
and Right.
<P>Reverse returned:
<CFOUTPUT>#Reverse(FORM.myString)#</CFOUTPUT>
<P>Please enter a string to be reversed.
505
Need help?
Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?
Questions and answers