Whatever message this page gives is out now! Go check it out!

LTrim

Last update:
May 18, 2026

Description

Removes leading spaces from a string.

Returns

A copy of the string without leading spaces.

Category

Syntax

LTrim(string)

See also

Parameters

Parameter
Description
string
A string or a variable that contains a string.

Example

<cfscript>
       myString=LTrim("   Mary had a little lamb"); // The input string has leading spaces
       WriteOutput(myString);
</cfscript>

Output

Mary had a little lamb

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page