LTrim - Built-in String Function¶
Purpose¶
LTrim returns a string with leading spaces removed.
Syntax¶
LTrim(str)
Arguments¶
| Argument | Required | Description |
|---|---|---|
str |
Yes | Any valid string expression from which the spaces will be removed |
Returns¶
Variant with a string (VT_BSTR) value
Example¶
Let sTest = " Hello World " // Contains 4 spaces, "Hello World", 4 spaces
Return LTrim(sTest) // returns "Hello World "
// four spaces at the end are still there
See Also¶
Notes¶
- When
strcannot be converted to a string, a runtime error is generated. - When concatenating two strings, the minus operator before the 2nd part performs a LTrim.