DELETE
Deletes part of a string.

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 *)

(* 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