FIND (FUN)

 

FUNCTION FIND : INT

Searches for the position of a partial string within a string.

FIND(STR1, STR2) means: Find the position of the first character where STR2 appears in STR1 for the first time. If STR2 is not found in STR1, then OUT:=0.

(* Example declaration *)
arINT1 : INT ;

(* Example in ST , result is '4' *)
arINT1 := FIND ('abcdef','de');

InOut:

Scope

Name

Type

Comment

Return

FIND

INT

Character position of the first occurance of STR2 in STR1. If no occurance is found, result is 0

Input

STR1

STRING(255)

String within which STR2 is searched

STR2

STRING(255)

String whose position is searched in STR1