Description

Return a specified number of characters from the beginning of a string

Syntax

left(text, length)

Parameters

Input ParameterTypeDescription
textstringThe input string
lengthnumberThe number of characters to return from the beginning

Return value

Type
string

Sample

ExampleResultDescription
left("abcd", 2)"ab"The substring containing the leftmost characters
left("abcd", 5)"abcd"left function with length greater than the string length
left("", 5)""left function for an empty string

To view all the String functions, click here.