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 |
|
n |
The length of the substring |
Return value:
A string
Example:
left("abcdefg",3) |
"abc" |
left("abcdefg",-3) |
"abcd" |
Related functions: