Name

Right

Synopsis

Right(string, count)

Returns the number of characters specified by count, beginning at the rightmost position of string. The following example returns the five rightmost characters of a string:

<CFSET MyString="(555)555-5555 x5555">
<CFSET Extension = Right(MyString, 5)>
<CFOUTPUT>
<B>String:</B> #MyString#<BR>
<B>Extension:</B> #Extension#
</CFOUTPUT>

Get Programming ColdFusion now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.