FIND
Locates and provides the position of sub-strings within strings.

Arguments | |||
---|---|---|---|
IN | IN | MESSAGE | Any message string |
Pat | Pat | MESSAGE | Any non-empty string (Pattern) |
FIND | Pos | DINT | = 0 if sub string Pat not found = position of the first character of the first occurrence of the sub-string Pat (first position is 1) this function is case sensitive |
Example
(* FBD Program using "FIND" Function *)

(* ST Equivalence: *)
complete_string := 'ABCD' + 'EFGH'; (* complete_string is 'ABCDEFGH ' *) found := FIND (complete_string, 'CDEF'); (* found is 3 *)
Provide Feedback