Built-in Functions → left

left() is a string function that returns the left-most n characters where n is set in the int exp argument.

Signature

left(string exp, int exp)

The following table illustrates the left() parameters:

ParameterDescription
string expstring to extract a the left-most n characters from
int expnumber of characters to return from the string

Returns

string

Example

left("Hello", 2)

In this example, left returns "He".