DELETE

Deletes part of a string.
lrsf_de1_cam5
Arguments
IN
IN
MESSAGE
Any non-empty string
NbC
NbC
DINT
Number of characters to be deleted
Pos
Pos
DINT
Position of the first deleted character
DELETE
Q
MESSAGE
modified string
empty string if Pos < 1
initial string if Pos > IN string length
initial string if NbC <= 0
Example
(* FBD Program using "DELETE" Function *)
lrsf_de2_cam5
(* ST Equivalence: *)
complete_string := INSERT (’ABCD ’, ’EFGH’, 5); (* complete_string is 'ABCDEFGH ' *) sub_string := DELETE (complete_string, 4, 3); (* sub_string is 'ABGH '*)
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal