Action
Returns the left-most characters of a string.
Syntax
sSubstring = Left (xString, iNumChars)
Variable
|
Description
|
sSubstring
|
The specified substring. STRING.
|
sString
|
The string from which to return characters. STRING.
|
iNumChars
|
The number of characters to return, starting with the
left-most.
INTEGER.
|
Notes
Left returns the left-most iNumChars characters in sString. If iNumChars is 0, Left returns an empty
string (""). If iNumChars
is greater than the length of sString, Left returns sString. If iNumChars is negative, an exception is
raised.
Example
STRING s = "XYZ Software"
Print (Left (s, 3)) // prints: XYZ
Print (Left (s, 20)) // prints: XYZ Software