Attention

IronPLC supports IEC 61131-3 Structured Text excluding I/O mapping.

REPLACE

Replaces characters in a string.

IEC 61131-3

Section 2.5.1.5.7

Support

Supported

Signatures

#

Input (IN1)

Input (IN2)

Input (L)

Input (P)

Return Type

Support

1

STRING

STRING

INT

INT

STRING

Supported

2

WSTRING

WSTRING

INT

INT

WSTRING

Not yet supported

Description

REPLACE(IN1, IN2, L, P) replaces L characters in IN1 with IN2 starting at position P. Positions are 1-based.

The replacement string IN2 does not need to be the same length as the portion being replaced.

Example

See Also