The Find First Substring in Input String routine finds the first substring (in a provided list of substrings) occurring in a given string. Format STR$FIND_FIRST_SUBSTRING source-string ,index ,substring-index ,substring [,substring...]
1 – Returns
OpenVMS usage:longword_unsigned type: longword (unsigned) access: write only mechanism: by value The values returned by STR$FIND_FIRST_SUBSTRING and the conditions to which they translate are as follows: Returned Value Condition 0 source-string did not contain any of the specified substrings. 1 STR$FIND_FIRST_SUBSTRING found at least one of the specified substrings in source-string.
2 – Arguments
source-string OpenVMS usage:char_string type: character string access: read only mechanism: by descriptor String that STR$FIND_FIRST_SUBSTRING searches. The source-string argument is the address of a descriptor pointing to the string. index OpenVMS usage:longword_signed type: longword (signed) access: write only mechanism: by reference Earliest position within source-string at which STR$FIND_FIRST_ SUBSTRING found a matching substring; zero if no matching substring was found. The index argument is the address of a signed longword containing this position. substring-index OpenVMS usage:longword_signed type: longword (signed) access: write only mechanism: by reference Ordinal number of the substring that matched (1 for the first, 2 for the second, and so on), or zero if STR$FIND_FIRST_SUBSTRING found no substrings that matched. The substring-index argument is the address of a signed longword containing this ordinal number. substring OpenVMS usage:char_string type: character string access: read only mechanism: by descriptor Specified substring for which STR$FIND_FIRST_SUBSTRING searches in source-string. The substring argument is the address of a descriptor pointing to the first substring. You can specify multiple substrings to search for. substring OpenVMS usage:char_string type: character string access: read only mechanism: by descriptor Additional specified substring for which STR$FIND_FIRST_SUBSTRING searches in source-string. The substring argument is the address of a descriptor pointing to the substring. You can specify multiple substrings to search for.