FIND

Finds a sub-string in a message string. Gives the position in the string of the sub-string.
lrsf_fi1
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 *)
lrsf_fi2
(* ST Equivalence: *)
complete_string := 'ABCD' + 'EFGH'; (* complete_string is 'ABCDEFGH' *) found := FIND (complete_string, 'CDEF'); (* found is 3 *)
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal