Ltrim Function

Action

Strips leading whitespace from a string.

Syntax

sStripped = Ltrim (sToStrip)
Variable Description
sStripped The stripped string. STRING.
sToStrip The string to strip. STRING.

Notes

  • Ltrim removes leading whitespace characters from a string and returns the rest of the string. If sToStrip is an empty string (""), or contains only whitespace, Ltrim returns an empty string.

  • Whitespace characters are spaces, horizontal tabs, vertical tabs, carriage returns, line feeds, and form feeds.

  • If sToStrip does not begin with whitespace, Ltrim returns sToStrip.

  • Ltrim removes leading whitespace characters as determined by IsSpace from a specified string.

Example

[ ] STRING s = " Has whitespace "
[ ] Print( ">{LTrim (s)}<") // prints: >Has whitespace <