Find

FIND

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

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

InputType Description
IN1 ANY_STRINGInput value
IN2 ANY_CHARS Input value
OutputType Description
ANY_INTOutput value

  • © Energocentrum Plus, s.r.o. 2017 - 2022