NexJ Logo

Left()

Returns the specified number of characters from the left side of a string of text. This function takes a string and integer value as arguments and returns a string value.

Syntax

Left(<text_to_trim>, <number_of_characters>)

Input

text_to_trim

string

The text to take characters from.

number_of_characters

integer

The number of characters to take from the left side of the text.

Output

string

Examples

  • The expression Left("The quick brown fox", 3) returns "The".
  • The expression Left("The quick brown fox", 9) returns "The quick".