WDELETE
![WDELETE 1:](Images/png/2261066251__Web.png)
The function WDELETE deletes part of a WSTRING from a certain point. The input STR is of type WSTRING. LEN and POS are of type INT. The return value of the function is of type WSTRING.
WDELETE (STR, LEN, POS) means: Delete LEN characters from STR beginning with the POSth character.
FUNCTION WDELETE: WSTRING (255)
VAR_INPUT
STR1 : WSTRING(255);
LEN : INT;
POS : INT;
END_VAR
Example in IL:
LD “SUXYSI“
WDELETE 2,3
ST Var1 (*Result is “SUSI“*)
Example in ST:
Var1 := WDELETE (“SUXYSI“,2,3);
Requirements
Development environment |
Target system type |
PLC libraries to be linked |
---|---|---|
TwinCAT v3.0.0 |
PC or CX (x86) |
Tc2_Standard |