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