UnicodeReplace (Unicode function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
<span style="font-size:120%; color:black"><b>String after replacements from Unicode replacement table</b></span>
{{Template:Unicode:UnicodeReplace subtitle}}
[[Category:Intrinsic Unicode methods|UnicodeReplace function]]
[[Category:Intrinsic Unicode methods|UnicodeReplace function]]
[[Category:Intrinsic methods]]
[[Category:Intrinsic methods]]
Line 10: Line 10:


The UnicodeReplace function is available as of version 7.3 of the ''Sirius Mods''.
The UnicodeReplace function is available as of version 7.3 of the ''Sirius Mods''.
===Syntax===
==Syntax==
  %unicode = unicode:UnicodeReplace
{{Template:Unicode:UnicodeReplace syntax}}
====Syntax Terms====
===Syntax terms===
<dl>
<dl>
<dt><i>%unicode</i>
<dt><i>%unicode</i>
Line 21: Line 21:


</dl>
</dl>
===Usage Notes===
==Usage notes==
<ul>
<ul>
<li>The method output is the input Unicode string, with those characters
<li>The method output is the input Unicode string, with those characters
Line 29: Line 29:
the method merely copies its input.
the method merely copies its input.
</ul>
</ul>
===Examples===
==Examples==


The following example shows a successful call of UnicodeReplace.
The following example shows a successful call of UnicodeReplace.
The [[U (String function)|U constant function]] is used in the example.
The [[U (String function)|U constant function]] is used in the example.


An updating UNICODE command is used &ldquo;in-line&rdquo;
An updating UNICODE command is used "in-line"
with the User Language request to make the example concrete.
with the User Language request to make the example concrete.
In actual usage, updating UNICODE commands should only be issued
In actual usage, updating UNICODE commands should only be issued

Revision as of 04:09, 19 January 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..

The UnicodeReplace function is available as of version 7.3 of the Sirius Mods.

Syntax

%outUnicode = unicode:UnicodeReplace

Syntax terms

%unicode
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.

Examples

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)