ZBasic System Library
Function returning String
The string from which to extract characters.
The number of characters to extract from the string.
This function returns a string consisting of the leftmost characters of the given string. The maximum
number of characters in the returned string is the smaller of 1) the number of characters in the string
passed as the first parameter and 2) the value of the second parameter. Internally, the length is
interpereted as a 16-bit signed value and negative values are treated as zero.
This function produces the same result as Mid(str, 1, length).
Dim s as String, s2 as String
s = "Hello, world!"
s2 = Left(s, 5)
' the result will be "Hello"