Description
Reverses the order of items, such as the characters in a string or the digits in a number.
Returns
A copy of string, with the characters in reverse order.
Reverses the order of items, such as the characters in a string or the digits in a number.
A copy of string, with the characters in reverse order.
1 | Reverse (string) |
1 | < cfoutput > reverse (6*2) equals # reverse (6*2)#< cfoutput > |
1 | reverse (6*2) equals 21 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | <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> |