$Delimr: Difference between revisions
m (1 revision) |
mNo edit summary |
||
Line 2: | Line 2: | ||
<span class="pageSubtitle"><section begin="desc" />Insert delimiter string into input string at regular positions<section end="desc" /></span> | <span class="pageSubtitle"><section begin="desc" />Insert delimiter string into input string at regular positions<section end="desc" /></span> | ||
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Delimr function is [[ | <p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Delimr function is the [[Insert (String function)]].</p> | ||
This function inserts a delimiter string into an input string at regular positions. The $Delimr function accepts three arguments and returns a string result that is made up of the first argument string and the delimiters. | This function inserts a delimiter string into an input string at regular positions. The $Delimr function accepts three arguments and returns a string result that is made up of the first argument string and the delimiters. | ||
Line 17: | Line 17: | ||
</p> | </p> | ||
<p class="caption">%STRING is made up of the first argument string and delim.</p> | <p class="caption">%STRING is made up of the first argument string and delim.</p> | ||
For example | For example | ||
Line 26: | Line 25: | ||
</p> | </p> | ||
would set %JUNK to <tt>A B C D E F G</tt>. | would set %JUNK to <tt>A B C D E F G</tt>. | ||
<ul class="smallAndTightList"> | <ul class="smallAndTightList"> | ||
<li>[[Sirius functions]]</li> | <li>[[Sirius functions]]</li> | ||
Line 39: | Line 39: | ||
<p class="caption">Products authorizing $Delimr | <p class="caption">Products authorizing $Delimr | ||
</p> | </p> | ||
[[Category:$Functions|$Delimr]] | [[Category:$Functions|$Delimr]] |
Revision as of 20:54, 31 January 2011
<section begin="desc" />Insert delimiter string into input string at regular positions<section end="desc" />
Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Delimr function is the Insert (String function).
This function inserts a delimiter string into an input string at regular positions. The $Delimr function accepts three arguments and returns a string result that is made up of the first argument string and the delimiters.
The first argument is an arbitrary string.
The second argument is a delimiter string that is truncated at two characters if longer.
The third argument is a number that indicates the intervals at which to insert the delimiter string. If this argument is omitted, the delimiter string is not inserted.
Syntax
<section begin="syntax" /> %STRING = $Delimr(string, delim, interval) <section end="syntax" />
For example
%JUNK = $Delimr('070476', '/', 2)
would set %JUNK to 07/04/76 and
%JUNK = $Delimr('ABCDEFG', ' ', 1)
would set %JUNK to A B C D E F G.