WREPLACE (FUN)ΒΆ
FUNCTION WREPLACE : WSTRING(255)
Replaces L wcharacters of STR1 by STR2, starting at the POS-th wcharacter position and returns the new string. POS = 1 is the first character.
Note
The current implementation is unfortunately not correct for the case
P=0
. The implementation cannot be changed for compatibility reasons.If
P=0
is used, the parameter L
is internally reduced by one!It is generally recommended to use values in the range specified by IEC 61131-3. The smallest value for
P
is specified there as 1
.- InOut:
Scope
Name
Type
Return
WREPLACE
WSTRING(255)
Input
STR1
WSTRING(255)
STR2
WSTRING(255)
L
INT
P
INT