$Lstr Unblank: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
(Automatically generated page update)
Line 46: Line 46:
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Media: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>[[Media: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 22:35, 19 February 2015

Remove extraneous blanks from longstring

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

This function takes a string or longstring input and produces the a copy with leading trailing and duplicate internal blanks (or other pad character) removed.

The $Lstr_Unblank function accepts two arguments and returns a string result.

The first argument is an arbitrary string or longstring. This is a required argument.

The second argument is a string containing a single character that is treated as the blank character. This is an optional argument and defaults to a blank.

Syntax

%result = $Lstr_Unblank(longstring, char)

%result is a copy of longstring with leading, trailing, and extra intermediate blank characters removed.

Usage notes

  • $Lstr_Unblank acts very much like $UnBlank except:
    • A character other than blank can be specified as the separator character (argument 2).
    • It cancels the request if the result target is too short to hold the result.
    • It can operate on a LONGSTRING input.
    • It produces a LONGSTRING output.

Examples

  1. To set %BIG to "Rubeus Hagrid":

    %BIG = $Lstr_Unblank(' Rubeus Hagrid ')

  2. To set %BIG to "Avada!Kedavra":

    %BIG = $Lstr_Unblank('!!Avada!!!!Kedavra!', '!')

Products authorizing $Lstr_Unblank