Left Procedure

Returns the lChars leftmost characters of the string sStr.

Syntax

[ s = ] Left ( sStr, lChars )

The Left procedure syntax has the following parts:

Name

Type

Description

s

BString

The result string

sStr

Val BString

Input string

lChars

Val Long

Number of characters

Comments

If lChars is greater than the length (not dim) of sStr, the returned string s will have the same length as sStr. If lChars is 0 or less than 0, an empty string is returned.

Example

Print Left("ATEasy", 3) ! This will print "ATE"

See Also

Len, LTrim, Mid, Right, RTrim