$SubErs: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
(Automatically generated page update)
Line 57: Line 57:
<li>[[List of $functions|Sirius functions]]</li>
<li>[[List of $functions|Sirius functions]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[http://m204wiki.rocketsoftware.com/images/4/4a/JoclrNew.pdf Janus Open Client]</li>
<li>[[Media:JoclrNew.pdf|Janus Open Client]</li>
<li>[http://m204wiki.rocketsoftware.com/images/1/17/JosrvrNew.pdf Janus Open Server]</li>
<li>[http://m204wiki.rocketsoftware.com/images/1/17/JosrvrNew.pdf Janus Open Server]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Sockets]]</li>

Revision as of 22:03, 19 February 2015

Remove occurrence of one string from another

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

This function removes an occurrence of one string from another.

The $SubErs function accepts four arguments and returns a string result that is part of the first argument string.

Syntax

%string = $SubErs(string, substring, start_pos, [count])

Syntax terms

%string The part of the string argument that remains after substring is removed from it.
string An arbitrary string.
substring Another arbitrary string.
start_pos A starting position within string.
count A repeat count indicating the number of occurrences of substring to be removed. This is an optional argument, and it defaults to 1.

Examples

  1. This statement sets %JUNK to CDABAB:

    %JUNK = $SubErs('ABCDABAB', 'AB')

  2. This statement sets %JUNK to WE WAITED LONG ENOUGH:

    %JUNK = $SubErs('WE HAVE WAITED LONG ENOUGH', 'HAVE ')

  3. This statement sets %JUNK to WE HAVE AITED LONG ENOUGH:

    %JUNK = $SubErs('WE HAVE WAITED LONG ENOUGH', 'W', 5)

  4. This statement sets %JUNK to E HAVE AITED LONG ENOUGH:

    %JUNK = $SubErs('WE HAVE WAITED LONG ENOUGH', 'W', 1, 5)

Products authorizing $SubErs