DELETEPermalink

Provided by standard library.

DELETE removes a partial string from a larger string at a defined position.

The input variable STR is type STRING, LEN and POS are type INT, the return value of the function is type STRING.

DELETE(STR, L, P) means: Delete L characters from STR beginning with the character in the P position.

Example in Function Block Diagram

COD_DELETE

Example in Structured Text

Var1 := DELETE ('SUXYSI',2,3);

String functions are not "thread safe": When using tasks, string functions may only be used in a single task. If the same function is used in different tasks, there is a danger of overwriting.