LTrim

Description

Returns string with leading spaces removed.

Category

String functions

Syntax

LTrim(string) 

See also

RTrim, ToBase64

Parameters

Parameter
Description
string
String to left-trim.

Example

<!--- This example shows the use of LTrim --->
<html>
<head>
<title>
LTrim Example
</title>
</head>

<body bgcolor = silver>
<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" method = "POST">
<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>

</body>
</html>