UnicodeReplace (Unicode function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (syntax terms and tags)
Line 1: Line 1:
{{Template:Unicode:UnicodeReplace subtitle}}
{{Template:Unicode:UnicodeReplace subtitle}}
Items in the replacement table are created with <tt>UNICODE Rep</tt> update commands, as described in [[??]] refid=updtuni..


Items in the replacement table are created with <tt>UNICODE Rep</tt> update
commands, as described in [[??]] refid=updtuni..
The <var>UnicodeReplace</var> function is available as of version 7.3 of the <var class=product>Sirius Mods</var>.
==Syntax==
==Syntax==
{{Template:Unicode:UnicodeReplace syntax}}
{{Template:Unicode:UnicodeReplace syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%unicode</th>
<tr><th>%outUnicode</th>
<td>A <var>Unicode</var> variable to receive the method object string altered by any replacement characters. </td></tr>
<td>A <var>Unicode</var> variable to receive the method object string altered by any replacement characters. </td></tr>
<tr><th>unicode</th>
<tr><th>unicode</th>
<td>A <var>Unicode</var> string.</td></tr>
<td>A <var>Unicode</var> string.</td></tr>
</table>
</table>
==Usage notes==
==Usage notes==
<ul>
<ul><li>The method output is the input <var>Unicode</var> string, with those characters specified in the <var>Unicode</var> replacement table replaced by their corresponding <var>Unicode</var> strings. If no <var>Unicode</var> replacement table is in effect, the method merely copies its input.
<li>The method output is the input <var>Unicode</var> string, with those characters
<li><var>UnicodeReplace</var> is available as of <var class="product">[[Sirius Mods|"Sirius Mods"]]</var> Version 7.3.
specified in the <var>Unicode</var> replacement table
replaced by their corresponding <var>Unicode</var> strings.
If no <var>Unicode</var> replacement table is in effect,
the method merely copies its input.
</ul>
</ul>
==Examples==
==Examples==
<ol><li>The following example shows a successful call of <var>UnicodeReplace</var>.  The [[U (String function)|U constant function]] is used in the example.


The following example shows a successful call of <var>UnicodeReplace</var>.
An updating UNICODE command is used "in-line" with the User Language request to make the example concrete. In actual usage, updating UNICODE commands should only be issued from your <var class="product">Model 204</var> initialization stream.
The [[U (String function)|U constant function]] is used in the example.
 
An updating UNICODE command is used "in-line"
with the User Language request to make the example concrete.
In actual usage, updating UNICODE commands should only be issued
from your ''Model 204'' initialization stream.
<p class="code">UNICODE Table Standard Rep U=2122 '(TM)'
<p class="code">UNICODE Table Standard Rep U=2122 '(TM)'
Begin
begin
%u Unicode Initial('Cool&amp;#x2122;':U)
  %u Unicode Initial('Cool&amp;#x2122;':U)
Print %u:UnicodeReplace
  print %u:UnicodeReplace
End
end
</p>
</p>
The result is:
The result is:
<p class="output">Cool(TM)
<p class="output">Cool(TM)
</p>
</p></ol>


==See also==
==See also==
{{Template:Unicode:UnicodeReplace footer}}
{{Template:Unicode:UnicodeReplace footer}}

Revision as of 08:44, 24 February 2011

Apply the replacement table to this string (Unicode class)

Items in the replacement table are created with UNICODE Rep update commands, as described in ?? refid=updtuni..

Syntax

%outUnicode = unicode:UnicodeReplace

Syntax terms

%outUnicode A Unicode variable to receive the method object string altered by any replacement characters.
unicode A Unicode string.

Usage notes

  • The method output is the input Unicode string, with those characters specified in the Unicode replacement table replaced by their corresponding Unicode strings. If no Unicode replacement table is in effect, the method merely copies its input.
  • UnicodeReplace is available as of "Sirius Mods" Version 7.3.

Examples

  1. The following example shows a successful call of UnicodeReplace. The U constant function is used in the example. An updating UNICODE command is used "in-line" with the User Language request to make the example concrete. In actual usage, updating UNICODE commands should only be issued from your Model 204 initialization stream.

    UNICODE Table Standard Rep U=2122 '(TM)' begin %u Unicode Initial('Cool&#x2122;':U) print %u:UnicodeReplace end

    The result is:

    Cool(TM)

See also