Choose where you’d like to start

left()

Overview

The left() function takes a string and a number as arguments. It returns the specified number of characters from the string's left side.

Return Type

  • Text

Syntax

<variable> = <string>.left(<number>);
ParameterDescriptionData type
<variable>Variable which will contain the returned string value.TEXT
<string>The string from which the characters will be returned.TEXT
<number>

The number of characters which will be returned.

If the number exceeds the count of characters in the string, an error will be encountered during runtime.

Negative values will return the full string.

NUMBER

Examples

product_name="Zoho Creator";
newText = product_name.left(4);       // returns "Zoho"

Get Started Now

Execute