-

REPLACE

Type Function
Description Replaces a substring in the string applied to input IN1 by the string applied to input IN2. L characters of IN1 are replaced by IN2, starting at character position P.
Notes
  • P cannot be 0. The first position in a string is 1.
  • Do not use the same string as input and output string because the output string might add up until the output string is too short and the string is cleared or the string may get shrunk in a loop (depending on L).
  • When the string output is longer than 80 characters and the FU is directly connected to another FU, temporary string variables of size 80 are used. Calculation/usage will fail. If the result of the operation is longer than 80 characters, then a 'String too short' message will be logged and the output is set to an empty string or the last valid value is kept, respectively. Use an intermediate local variable in-between.
Parameters Inputs

IN1

IN2

L

P

Output

OUT
Error behavior Error behavior
Additional information EN/ENO behavior