Utility Functions : List of Utility Functions : stm_index

stm_index

Function type: INTEGER

Description
Looks for the specified pattern in the given string. It returns the first occurrence, starting from the offset position.
Note the following:

The first position in the string is 0.

If the pattern is not found in the string, the function returns -1.

Syntax
stm_index (string, offset, pattern, status)
Arguments
 

 

Status Codes
Example

stm_index(’AB@CB’,0,’B’,status) = 1
stm_index(’AB@CB’,3,’B’,status) = 4
stm_index(’AB@CB’,0,’XY’,status) = -1