Home / lang / left 
Left$
Syntax
sResult = Left$ ( sArg AS String [ , iLength AS Integer ] ) AS String
sResult = Left ( sArg AS String [ , iLength AS Integer ] ) AS String

Returns the iLength first characters of a the String sArg.

If iLength is not specified, the first character of the string is returned.

If iLength is negative, all the string except the (- iLength ) last characters is returned.

Example
PRINT Left$("Gambas", 4)

Gamb
Example
PRINT Left$("Gambas")

G
Example
PRINT Left$("Gambas", -1)

Gamba


See also
String Functions