Documentation

Find

Function name

FIND

ST call

PROGRAM FIND_DEMO
VAR
STRING1,STRING2: STRING;
OUT: INT;
END_VAR
OUT3:= FIND(IN1:=STRING1, IN2:=STRING2);
END_PROGRAM

Description

Find the characterposition of the beginning of the first occurence of IN2 in IN1. If no occurence is found, then OUT:=0.

Inputs

Input Type Description
IN1 ANY_STRING Input value
IN2 ANY_CHARS Input value

Outputs

Output Type Description
=> ANY_INT Output value

Example