$StrOr: Difference between revisions
(Automatically generated page update) |
(Automatically generated page update) |
||
Line 15: | Line 15: | ||
==Syntax== | ==Syntax== | ||
<p class="syntax">%STR = $StrOr(string1, string2, pad) | <p class="syntax"><span class="term">%STR</span> = <span class="literal">$StrOr</span>(string1, string2, pad) | ||
</p> | </p> | ||
<p> | <p> |
Revision as of 23:40, 12 April 2013
Bit-wise OR two strings
Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $StrOr function is the BitOrString (String function).
This function performs a bit-wise OR of two strings.
The $StrOr function accepts three arguments and returns a string result that is the bit-wise OR of the first two arguments, the shorter being padded with as many copies of the third argument as are required to make the string lengths equal.
The first argument is an arbitrary string.
The second argument is another arbitrary string.
The third argument is another arbitrary string that is appended to the shorter of the first two strings and replicated as many times as required to make the strings of equal length. If this value is not specified or is null it defaults to a single null byte (X'00').
Syntax
%STR = $StrOr(string1, string2, pad)
%STR is the bit-wise OR of string1 and string2.
For example
%X = $X2C('112233445566') %Y = $X2C('654321') %JUNK = $StrOr(%X, %Y)
would set %JUNK to X'756333445566' and
%X = $X2C('112233445566') %JUNK = $StrOr(%X, , $X2C('CC'))
would set %JUNK to X'DDEEFFCCDDEE' and
%X = $X2C('112233445566') %Y = $X2C('1122') %Z = $X2C('FF00') %JUNK = $StrOr(%X, %Y, %Z)
would set %JUNK to X'1122FF44FF66'.
$StrOr is only available in Sirius Mods Version 6.2 and later.
Products authorizing $StrOr
- Sirius functions
- Fast/Unload User Language Interface
- Janus Open Client
- Janus Open Server
- Janus Sockets
- Janus Web Server
- Japanese functions
- Sir2000 Field Migration Facility