UnicodeLength (Unicode function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (syntax terms, tags, links)
Line 1: Line 1:
{{Template:Unicode:UnicodeLength subtitle}}
{{Template:Unicode:UnicodeLength subtitle}}
<var>UnicodeLength</var> returns the number of characters in the method object string.


This function returns the number of characters in the method object string.
The <var>UnicodeLength</var> function is available as of version 7.5  of the <var class=product>Sirius Mods</var>.
==Syntax==
==Syntax==
{{Template:Unicode:UnicodeLength syntax}}
{{Template:Unicode:UnicodeLength syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%len</th>
<tr><th>%number</th>
<td>A numeric variable to receive the result of the <var>UnicodeLength</var> method. </td></tr>
<td>A numeric variable to receive the result of the <var>UnicodeLength</var> method. </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 <var>UnicodeLength</var> method is analogous to the <var>String</var> intrinsic <var>[[Length (String function)|Length]]</var> method.
<li>The <var>UnicodeLength</var> method is analogous to
<li><var>UnicodeLength</var> is available as of <var class="product">[[Sirius Mods|"Sirius Mods"]]</var> Version 7.5.</ul>
the <var>String</var> intrinsic [[Length (String function)|Length]] method.
</ul>


==Examples==
==Examples==
 
<ol><li>The following fragment prints a <var>Unicode</var> string, then its length:
The following fragment prints a <var>Unicode</var> string, then its length:
<p class="code">%u unicode initial ('&amp;#x40;xyz':U)
<p class="code">%u unicode initial ('&amp;#x40;xyz':U)
Print %u
print %u
Print %u:unicodelength
print %u:unicodelength
</p>
</p>
The result is:
The result is:
<p class="output">@xyz
<p class="output">@xyz
4
4
</p>
</p></ol>
 
==See also==
==See also==
{{Template:Unicode:UnicodeLength footer}}
{{Template:Unicode:UnicodeLength footer}}

Revision as of 07:52, 24 February 2011

Length of this string (Unicode class)

UnicodeLength returns the number of characters in the method object string.

Syntax

%number = unicode:UnicodeLength

Syntax terms

%number A numeric variable to receive the result of the UnicodeLength method.
unicode A Unicode string.

Usage notes

  • The UnicodeLength method is analogous to the String intrinsic Length method.
  • UnicodeLength is available as of "Sirius Mods" Version 7.5.

Examples

  1. The following fragment prints a Unicode string, then its length:

    %u unicode initial ('&#x40;xyz':U) print %u print %u:unicodelength

    The result is:

    @xyz 4

See also