contents.gifindex.gifprev1.gifnext1.gif

LTrim, LTrim$

Purpose

Returns a copy of a string with leading (leftmost) spaces removed.

Arguments

Ltrim[$]( stringexpr )

Notes

LTrim[$] removes leading and trailing spaces from a string.

LTrim returns a Variant; LTrim$ returns a String. The stringexpr argument can be any string expression. However, only LTrim can accept a Variant of Null as stringexpr, in which case, a Null is returned.

Example

This example uses LTrim to strip leading spaces from the variable TestString.

StripLeadSpace = Ltrim( TestString ) // Strip leading spaces.