The string to be processed
The number of characters to return from the left of the string
Returns a string containing the leftmost
length characters of
length is 0, a zero-length string
(“”) is returned.
length is greater than the length of
Use the Len function to determine the overall
The Left function corresponds to the BCL
System.String class’ Substring method. For example,
the following two assignments to the
variable are functionally identical:
Dim sCity As String Dim sLocation As String = "New York, New York" sCity = Left(sLocation, 8) sCity = sLocation.Substring(0, 8)
Note that the Substring method uses a zero-based index to determine the starting position of the substring.