INSERT
Inserts sub-strings at user-defined positions within strings.

Arguments | |||
---|---|---|---|
IN | IN | STRING | Initial string |
Str | Str | STRING | String to be inserted |
Pos | Pos | DINT | Position of the insertion the insertion is done before the position (first valid position is 1) |
INSERT | Q | STRING | Modified string empty string if Pos <= 0 concatenation of both strings if Pos is greater than the length of the IN string |
Example
(* FBD Program using "INSERT" Function*)

(* ST Equivalence: *)
MyName := INSERT ('Mr JONES', 'Frank ', 4); (* MyName is 'Mr Frank JONES' *)
Provide Feedback