INSERT¶
Provided by Standard Library.
Function of type STRING, inserts a string into another string at a defined point.
Inputs:
STR1 : STRING; string into which STR2 has to be inserted
STR2 : STRING; string which has to be inserted into STR1
POS : INT; Position in STR1 after which STR2 has to be inserted, number of characters counted from left, starting with “1”.
Return value: STRING, resulting string
INSERT (STR1, STR2, POS) means: Insert STR2 into STR1 after position POS.
Example in IL: ( Result is ‘SUXYSI’ )\ \ \ \
Example in FBD:\ \ \ \
Example in ST:\ \ \ \
VarSTRING1 := INSERT ('SUSI','XY',2);