5.7 Standard Character String Functions
5.7.5 String replacement
5-169
5
APPLICATION
FUNCTIONS
REPLACE(_E)
REPLACE(_E)
5.7.5 String replacement
REPLACE(_E)
Function
Operation processing
(1) Replaces the specified number of characters from the specified position in the character
string input to with the character string input to , and outputs the operation result from
.
The number of characters to be replaced is specified by the value input to .
The start position to be replaced in the character string is specified by the value input to .
REPLACE(_E)
_E: With EN/ENO
indicates any of the following
functions.
REPLACE REPLACE_E
Input argument, EN:
Executing condition (TRUE: Execution, FALSE: Stop) :Bit
s1:
Input :String
s2:
n1:
Number of characters to be replaced :Word (signed)
n2:
Start position to be replaced :Word (signed)
Output argument, ENO:
Output status (TRUE: Normal, FALSE: Error) :Bit
d:
Output :String
Universal
UD
High
Performance
REPLACE_E
(EN, s1, s2, n1, n2, d);
ENO:=
Structured ladder
ST
EN ENO
s1 d
s2
n1
REPLACE_E
n2
s1
s2
d
n1
n2