$Lstr_Unblank

From m204wiki
Revision as of 22:18, 8 February 2011 by 198.242.244.47 (talk) (Created page with "{{DISPLAYTITLE:$Lstr_Unblank}} <span class="pageSubtitle"><section begin="desc" />Remove extraneous blanks from longstring<section end="desc" /></span> <p class="warning">Most S...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<section begin="desc" />Remove extraneous blanks from longstring<section end="desc" />

Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Lstr_Unblank function is to be entered.

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

<section begin="syntax" /> %RESULT = $Lstr_Unblank(longstring, char) <section end="syntax" />

$Lstr_Unblank function

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

$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.

For example

%BIG = $Lstr_Unblank(' Rubeus Hagrid ')

sets %BIG to "Rubeus Hagrid" and

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

sets %BIG to "Avada!Kedavra&CQ..

For more information see :hdref refid=lstr..

$Lstr_Unblank is only available in Sirius Mods Version 6.2 and later.

Products authorizing $Lstr_Unblank