$DelCh: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
(Automatically generated page update)
Line 50: Line 50:
<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>[http://m204wiki.rocketsoftware.com/images/4/4a/JoclrNew.pdf Janus Open Client]</li>
<li>[[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>
<li>[[Janus Web Server]]</li>
<li>[[Janus Web Server]]</li>

Revision as of 00:00, 13 September 2013

Remove characters from string, compress and strip blanks

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

This function removes specified characters from an input string and performs blank compression and stripping.

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

The first argument is an arbitrary string.

The second argument is the set of characters to be removed from the first argument string.

The third argument is a starting position in the first argument string.

The fourth argument is a number indicating the type of blank compression or stripping to be performed. Valid numbers and their meanings are:

  1. delete the specified characters
  2. delete the specified characters and strip leading and trailing blanks
  3. delete the specified characters, strip leading and trailing blanks and compress multiple blanks to a single blank.

This is an optional argument and defaults to 1.

Syntax

%STRING = $DelCh(string, chars, start_pos, [option])

%STRING is part of the first argument string.

Examples

  1. The following statement sets %JUNK to CD:

    %JUNK = $DelCh('ABCDAAAABAB', 'AB')

  2. This statement sets %JUNK to W HAV WAITD LONG NOUGH:

    %JUNK = $DelCh(' WE HAVE WAITED LONG ENOUGH ', 'E', , 3)

  3. This statement sets %JUNK to WE HAV AITD ONG NOUGH:

    %JUNK = $DelCh(' WE HAVE WAITED LONG ENOUGH ', 'WEL', 5, 3)

Products authorizing $DelCh