left() function

Returns a substring that contains the n leftmost characters of the string.

Syntax

left(string, length)

Arguments

string - is string. The string.
length - is int. The number of characters from the left to return.

Example

left('Hello World',5) → 'Hello'