Left function (LotusScript® Language)

Extracts a specified number of the leftmost characters in a string.

Syntax

Left[$] ( expr , n )

Elements

expr

Any numeric or String expression for Left; and any Variant or String expression for Left$. If expr is numeric, LotusScript® converts it to a string before performing the extraction.

n

The number of characters to be returned.

Return value

Left returns a Variant of DataType 8 (a String), and Left$ returns a String.

If n is 0, the function returns the empty string (""). If n is greater than the length (in characters) of expr, the function returns the entire string.

Left(NULL) returns NULL. Left$(NULL) is an error.

Example