Table of Contents

LEFT

Function name

LEFT

ST call

PROGRAM LEFT_DEMO
  VAR
   STRING1,STRING2: STRING;
    INT1: INT;
    END_VAR
    STRING2:=LEFT(IN:=STRING1,L:=INT1);
END_PROGRAM

Description

Function returns part of the string. The output string size is defined by the input variable l, which specifies how many characters starting from the left there will be at the output.

Inputs

InputType Description
IN ANY_STRINGInput string
L ANY_INT Number of characters

Outputs

OutputType Description
ANY_STRINGOutput string

Application example