Left
Sub Left($s As String, $length As Integer) As String
Returns a string containing the specified number of characters ($length) from the left side of $s.
If $length is 0, an empty string is returned. If $length specifies more characters than are available in $s, the entire string is returned.
Parameters
- $s ... String expression from which the leftmost characters are returned.
- $length ... Integer expression that specifies how many characters to return.
Example:
Dim $s, $s2
$s = "This is a text"
$s2 = Left($s, 7)
' returns $s2 = "This is"