Table of Contents

INSERT

Function name

INSERT

ST call

PROGRAM INSERT_DEMO
    VAR
   STRING1,STRING2,STRING3: STRING;
    INT1: INT;
    END_VAR
    STRING1:=INSERT(IN1:=STRING2,IN2:=STRING3,P:=INT1);
END_PROGRAM

Description

Function merges two strings, the second string can be inserted into the first string.

Inputs

Input Type Description
IN1,IN2ANY_STRINGInput strings
DECIMALANY_INT Position of start of the second string in the first string

Outputs

OutputType Description
ANY_STRINGOutput string

Application example