| Contents > CFML Reference > ColdFusion Functions > Trim |
|
|
|
|
||
Removes leading and trailing spaces from a string.
A copy of string, after removing leading and trailing spaces.
Trim(string)
Parameter |
Description |
|---|---|
string |
A string or a variable that contains one |
<h3>Trim Example</h3>
<cfif IsDefined("FORM.myText")>
<cfoutput>
<pre>
Your string: "#FORM.myText#"
Your string: "#Trim(FORM.myText)#"
(trimmed on both sides)
</pre>
</cfoutput>
</cfif>
<form action = "trim.cfm">
<p>Type in some text, and it will be modified by trim to remove leading
spaces from the left and right
<p><input type = "Text" name = "myText" value = " TEST ">
<p><input type = "Submit" name = "">
</form>
|
|
||
| Contents > CFML Reference > ColdFusion Functions > Trim |
|
|
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funca111.htm
Comments
Belikov said on Aug 3, 2004 at 11:12 AM : MikerRoo said on Feb 18, 2005 at 2:07 AM : mysorian said on Sep 8, 2005 at 6:27 AM :