Attention

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

FIND

Searches for a substring within a string.

IEC 61131-3

Section 2.5.1.5.7

Support

Supported

Signatures

#

Input (IN1)

Input (IN2)

Return Type

Support

1

STRING

STRING

INT

Supported

2

WSTRING

WSTRING

INT

Not yet supported

Description

FIND(IN1, IN2) returns the position of the first occurrence of IN2 within IN1. Positions are 1-based. If IN2 is not found, the function returns 0.

Example

See Also

  • REPLACE — string replacement

  • MID — middle substring

  • LEN — string length