VMS Help
RTL Routines, STR$, STR$POSITION
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
The Return Relative Position of Substring routine searches for
the first occurrence of a single substring within a source
string. If STR$POSITION finds the substring, it returns the
relative position of that substring. If the substring is not
found, STR$POSITION returns a zero.
Format
STR$POSITION source-string ,substring [,start-position]
1 - Corresponding JSB Entry Point
|
STR$POSITION_R6
OpenVMS usage:longword_unsigned
type: longword (unsigned)
access: write only
mechanism: by value
Relative position of the first character of the substring. Zero
is the value returned if STR$POSITION did not find the substring.
On Alpha systems, if the relative position of the substring can
exceed 2**32-1, assign the return value to a quadword to ensure
that you retrieve the correct relative position.
source-string
OpenVMS usage:char_string
type: character string
access: read only
mechanism: by descriptor
Source string within which STR$POSITION searches for the
substring. The source-string argument is the address of a
descriptor pointing to the source string.
substring
OpenVMS usage:char_string
type: character string
access: read only
mechanism: by descriptor
Substring for which STR$POSITION searches. The substring argument
is the address of a descriptor pointing to the substring.
start-position
OpenVMS usage:longword_signed
type: longword (signed)
access: read only
mechanism: by reference
Relative position in the source string at which STR$POSITION
begins the search. The start-position argument is the address of
a signed longword containing the starting position. Although this
is an optional argument, it is required if you are using the JSB
entry point.
If start-position is not supplied, STR$POSITION starts the search
at the first character position of source-string.
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.