HELPLIB.HLB  —  RTL Routines, STR$  STR$REPLACE
    The Replace a Substring routine copies a source string to a
    destination string, replacing part of the string with another
    string. The substring to be replaced is specified by its starting
    and ending positions.

    Format

      STR$REPLACE  destination-string ,source-string ,start-position

                   ,end-position ,replacement-string

1  –  Corresponding JSB Entry Point

      STR$REPLACE_R8

2  –  Returns

    OpenVMS usage:cond_value
    type:         longword (unsigned)
    access:       write only
    mechanism:    by value

3  –  Arguments

 destination-string

    OpenVMS usage:char_string
    type:         character string
    access:       write only
    mechanism:    by descriptor

    Destination string into which STR$REPLACE writes the new string
    created when it replaces the substring. The destination-
    string argument is the address of a descriptor pointing to the
    destination string.

 source-string

    OpenVMS usage:char_string
    type:         character string
    access:       read only
    mechanism:    by descriptor

    Source string. The source-string argument is the address of a
    descriptor pointing to the source string.

 start-position

    OpenVMS usage:longword_signed
    type:         longword (signed)
    access:       read only
    mechanism:    by reference for CALL entry point, by value for JSB
                  entry point

    Position in the source string at which the substring that
    STR$REPLACE replaces begins. The start-position argument is the
    address of a signed longword containing the starting position.
    The position is relative to the start of the source string.

 end-position

    OpenVMS usage:longword_signed
    type:         longword (signed)
    access:       read only
    mechanism:    by reference for CALL entry point, by value for JSB
                  entry point

    Position in the source string at which the substring that
    STR$REPLACE replaces ends. The end-position argument is the
    address of a signed longword containing the ending position.
    The position is relative to the start of the source string.

 replacement-string

    OpenVMS usage:char_string
    type:         character string
    access:       read only
    mechanism:    by descriptor

    Replacement string with which STR$REPLACE replaces the substring.
    The replacement-string argument is the address of a descriptor
    pointing to this replacement string. The value of replacement-
    string must be equal to end-position minus start-position.
Close Help