$SubIns: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
(Automatically generated page update)
Line 57: Line 57:
<li>[[Janus Sockets]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Japanese functions]]</li>
<li>Japanese functions</li>
<li>[http://m204wiki.rocketsoftware.com/images/4/4b/SirfieldNew.pdf Sir2000 Field Migration Facility]</li>
<li>[http://m204wiki.rocketsoftware.com/images/4/4b/SirfieldNew.pdf Sir2000 Field Migration Facility]</li>
</ul>
</ul>

Revision as of 16:03, 8 July 2014

Insert string inside another string

Note: Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $SubIns function is Insert.

This function inserts a string inside another.

The $SubIns function accepts three arguments and returns a string result.

Syntax

%string = $SubIns(string, ins_string, insert_pos)

Syntax terms

%string The string result that is a combination of string and ins_string.
string An arbitrary string.
ins_string A string to be inserted in the string value.
insert_pos The insertion position in the string argument string.

Usage notes

  • If no insertion position is provided, the insertion string is appended to the end of the first input string. If the insertion point is past the first input string, the first input string is left unmodified.

Examples

  1. This statement sets %JUNK to PAT STAMPER, TRADER HORSE:

    %JUNK = $SubIns('PAT STAMPER, TRADER', ' HORSE')

  2. This statement sets %JUNK to PAT STAMPER, HORSE TRADER:

    %JUNK = $SubIns('PAT STAMPER, TRADER', ' HORSE', 12)

  3. This statement sets %JUNK to PAT STAMPER, TRADER:

    %JUNK = $SubIns('PAT STAMPER, TRADER', ' HORSE', 92)

    Products authorizing $SubIns