Macromedia coldfusion 4.5-cfml language reference User Manual

Page of 608
Chapter 2:  ColdFusion Functions
509
RTrim
Returns string with removed trailing spaces.
See also 
LTrim
 and 
Trim
.
Syntax
RTrim(
string)
string
String being right-trimmed.
Examples
<!--- This example shows the use of RTrim --->
<HTML>
<HEAD>
<TITLE>
RTrim Example
</TITLE>
</HEAD>
<BODY BGCOLOR=silver>
<H3>RTrim Example</H3>
<CFIF IsDefined("FORM.myText")>
<CFOUTPUT>
<PRE>
Your string:"#FORM.myText#"
Your string:"#Rtrim(FORM.myText)#"
(right trimmed)
</PRE>
</CFOUTPUT>
</CFIF>
<FORM ACTION="Rtrim.cfm" METHOD="POST">
<P>Type in some text, and it will be modified
by Rtrim to remove leading spaces from the right
<P><INPUT TYPE="Text" NAME="myText" VALUE="TEST     ">
<P><INPUT TYPE="Submit" NAME="">
</FORM>
</BODY>
</HTML>