The findFirstOf() built-in functions returns the position of the first character in the session variable that is any of the characters among the first parameter.
The findFirstOf built-in function scans the 2nd parameter for any of the characters specified on the first parameter, beginning at the optional starting position.
- Variable or quoted character string that is the list of characters to be located.
- The Session Variable that is searched.
- The starting position within the Session Variable (2nd parameter) to begin the scan.
eval &digits = '0123456789';
eval &partnbr = 'THX1128';
eval &part = findFirstOf(&digits, &partNbr);
#msg The part number digit appears in pos &part
The output written to the joblog is:
The part number digit appears in pos 4
If none of the characters are found, the result is 0.