Description:
Returns a specified number of characters (substring) from the left side of a string.
In the PROMOTIC system it is better to use the Pm.StringSub method.
Syntax:
String Left(String string, Integer length)
Parameters:
string | (String) Text string from which the leftmost characters are returned. |
length | (Integer) Numeric expression indicating how many characters to return. If 0, then a empty string ("") is returned. If greater than or equal to the string length, then the entire string is returned. |
---|
Note:
To determine the string length, use the
Len function.
Example:
VBScriptSelect and copy to clipboard
Dim sString, LeftString
sString = "VBScript"
LeftString = Left(sString, 3)
' LeftString contains "VBS"