Removes leading spaces from a string.
A copy of the string, without leading spaces.
Display and formatting functions, String functions
LTrim(string)
Parameter | Description |
---|---|
string |
A string or a variable that contains one |
<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"> <p>Type in some text, and it will be modified by Ltrim to remove leading spaces from the left <p><input type = "Text" name = "myText" value = " TEST"> <p><input type = "Submit" name = ""> </form>