Skip to content

Latest commit

 

History

History
74 lines (63 loc) · 2.32 KB

LEFT$.org

File metadata and controls

74 lines (63 loc) · 2.32 KB

Top | Up (String) | < Previous (PAGE NAME) | Next (PAGE NAME) >

LEFT$

Extract characters from the left side of a string

Syntax

LEFT$ string$, length% OUT substring$
ParameterDescription
string$A string
length%The number of characters to extract. Can’t be less than 0. If greater than the length of string$, the entire string is returned.
OutputDescription
substring$The leftmost length% characters of string$

LEFT$ always returns a new string, even if length% is greater than or equal to the length of string$.

Examples

PRINT LEFT$("TEST",2) ' TE
PRINT LEFT$("AAAAA",200) ' AAAAA

Possible Errors

ErrorCause
Out of rangelength% is less than 0

See Also:


Top | Up (String) | < Previous (PAGE NAME) | Next (PAGE NAME) >