Left

Block Group: String Operations
Icon:Left block icon

The Left block returns the specified number of leftmost characters from a string value.

For information on using dataflow blocks, see Dataflow.


Input/Output Properties

The following properties of the Left block can take input and give output.

  • input (string)
  • length (number)

input specifies the text string that contains the characters to extract.

length specifies how many characters to extract.


Output Property

The following property of the Left block can give output but cannot take input.

  • output (string)

output returns the extracted characters.


Special Cases

The following are special cases for the Left block:

  • The length property must be greater than or equal to zero.
  • If length is null, it is assumed to be zero.
  • If length is greater than the length of the text, output returns the entire input

Example

The following image demonstrates a Left block. In this example, the Left block extracts the leftmost 5 characters in "Final Price" and returns "Final."

Left block example