lTrim
Description
Removes leading spaces from a string.
Categories
Related
Syntax
LTrim(string)
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| string | A string or a variable that contains one |
Returns
A copy
of the string, without leading spaces.
Example
<h3>LTrim Example</h3>
<cfif IsDefined("FORM.myText")>
<cfoutput>
<pre>
Your string: "#FORM.myText#"
Your string: "#LTrim(FORM.myText)#"
(left trimmed)
</pre>
</cfoutput>
</cfif>
<form action = "ltrim.cfm">
Type in some text, and it will be modified by LTrim to remove
leading spaces from the left
<input type = "Text" name = "myText" value = " TEST">
<input type = "Submit" name = "">
</form>