Table of Contents

RIGHT

Function name

RIGHT

ST call

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

Description

Function returns part of the input string. The output string length is defined by the L variable which specifies how many characters starting from the right will be copied into the output string.

Inputs

InputType Description
IN ANY_STRINGInput string
L ANY_INT Number of characters from the right

Outputs

OutputType Description
ANY_STRINGOutput string

Application example