| Contents > CFML Reference > ColdFusion Functions > Reverse |
|
|
|
|
||
Reverses the order of items, such as the characters in a string, the digits in a number, or the elements in an array.
A copy of string, with the characters in reverse order.
Reverse(string)
Parameter |
Description |
|---|---|
string |
A string or a variable that contains one |
You can call this function on a number with code such as the following:
<cfoutput>reverse(6*2) equals #reverse(6*2)#<cfoutput>
This code outputs the following:
reverse(6*2) equals 21
<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 "">
<p>Reverse returned:
<cfoutput>#Reverse(FORM.myString)#</cfoutput>
<cfelse>
<p>Please enter a string to be reversed.
</cfif>
</cfif>
<form action = "reverse.cfm">
<p>Enter a string to be reversed:
<input type = "Text" name = "MyString">
<p><input type = "Submit" name = "">
</form>
|
|
||
| Contents > CFML Reference > ColdFusion Functions > Reverse |
|
|
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/functa73.htm
Comments
ekkis said on Jul 15, 2004 at 8:18 AM : ekkis said on Jul 15, 2004 at 8:30 AM :