636
Trim
Description
Returns string with leading and trailing spaces removed.
Category
String functions
Trim(string)
Syntax
See also
LTrim,
Parameters
Parameter
string
Example
<!--- This example shows the use of Trim --->
<html>
<head>
<title>
Trim Example
</title>
</head>
<body bgcolor = silver>
<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" method = "POST">
<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 = "
<P><input type = "Submit" name = "">
</FORM>
</body>
</html>
RTrim
Description
String to trim
Chapter 3 ColdFusion Functions
TEST
">
Need help?
Do you have a question about the COLDFUSION 5 - CFML and is the answer not in the manual?