INSERT

Inserts sub-strings at user-defined positions within strings.
lrsf_in1_cam5
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*)
lrsf_in2_cam5
(* ST Equivalence: *)
MyName := INSERT ('Mr JONES', 'Frank ', 4); (* MyName is 'Mr Frank JONES' *)
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal