Last updated on
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.
Category
Function syntax
Reverse(string)
<cfoutput>reverse(6*2) equals #reverse(6*2)#<cfoutput>
This code outputs the following:
reverse(6*2) equals 21
Example
<cfscript> stringToReverse="The quick brown fox jumps over the lazy dog" writeOutput(Reverse(stringToReverse)) </cfscript>
Output
god yzal eht revo spmuj xof nworb kciuq ehT