WDELETE

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
Sample in IL:
LD "SUXYSI"
WDELETE 2,3
ST Var1 (*Ergebnis ist "SUSI"*)
Sample in ST:
Var1 := WDELETE ("SUXYSI",2,3);
Requirements
Development environment | Target platform | PLC library to include |
---|---|---|
TwinCAT v3.0.0 | PC or CX (x86) | Tc2_Standard |