left

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"

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeluge.com