left()

Read(763) Label: source string, leftmost, substring,

Description:

Get a substring starting from the leftmost side of a string.

Syntax:

left(string,n)

Note:

The function gets a substring with the length of n starting from the leftmost side of string string. If n<0, the substring’s length is the sum of source string’s length and the value of n.

Parameter:

string

The source string from which the substring is obtained

n

The length of the substring

Return value:

A string

Example:

left("abcdefg",3)

"abc"

left("abcdefg",-3)

"abcd" 

Related functions:

mid()

right()