Removes spaces from the end of a string.
A copy of string, after removing trailing spaces.
RTrim(string)
| Parameter | Description |
|---|---|
|
string |
A string or a variable that contains one |
<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>Enter some text. It will be modified by Rtrim to remove spaces from the right.
<p><input type = "Text" name = "myText" value = "TEST ">
<p><input type = "Submit" name = "">
</form>