WLEFT

The function WLEFT supplies a left-hand start string for a WSTRING.
WLEFT (STR, SIZE) means: Take the first SIZE characters from the left in WString STR.
FUNCTION WLEFT: WSTRING (255)
VAR_INPUT
    STR  : WSTRING(255);
    SIZE : INT;
END_VARSample in IL:
LD "SUSI"
WLEFT 3
ST Var1 (*Ergebnis ist "SUS"*)Sample in ST:
Var1 := WLEFT ("SUSI",3);Requirements
| Development environment | Target platform | PLC library to include | 
|---|---|---|
| TwinCAT v3.0.0 | PC or CX (x86) | Tc2_Standard |