Table of Contents

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

InputType Description
IN1 ANY_STRINGInput value
IN2 ANY_CHARS Input value

Outputs

OutputType Description
ANY_INTOutput value

Example