UnicodeLength (Unicode function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 2: Line 2:
[[Category:Unicode methods|UnicodeLength function]]
[[Category:Unicode methods|UnicodeLength function]]
[[Category:Intrinsic methods]]
[[Category:Intrinsic methods]]
<!--DPL?? Category:Unicode methods|<var>UnicodeLength</var> function: Number of characters in string-->
<!--DPL?? Category:<var>Unicode</var> methods|<var>UnicodeLength</var> function: Number of characters in string-->
<!--DPL?? Category:Intrinsic methods|<var>UnicodeLength</var> (Unicode function): Number of characters in string-->
<!--DPL?? Category:Intrinsic methods|<var>UnicodeLength</var> (<var>Unicode</var> function): Number of characters in string-->
<!--DPL?? Category:System methods|<var>UnicodeLength</var> (Unicode function): Number of characters in string-->
<!--DPL?? Category:<var>System</var> methods|<var>UnicodeLength</var> (<var>Unicode</var> function): Number of characters in string-->


This function returns the number of characters in the method object string.
This function returns the number of characters in the method object string.
Line 16: Line 16:
<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><i>unicode</i></th>
<tr><th><i>unicode</i></th>
<td>A Unicode 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
<li>The <var>UnicodeLength</var> method is analogous to
the String intrinsic [[Length (String function)|Length]] method.
the <var>String</var> intrinsic [[Length (String function)|Length]] method.
</ul>
</ul>


==Examples==
==Examples==


The following fragment prints a Unicode string, then its length:
The following fragment prints a <var>Unicode</var> string, then its length:
<pre>
<pre>
     %u unicode initial ('&amp;#x40;xyz':U)
     %u unicode initial ('&amp;#x40;xyz':U)

Revision as of 15:49, 20 January 2011

Length of this string (Unicode class)

This function returns the number of characters in the method object string.

The UnicodeLength function is available as of version 7.5 of the Sirius Mods.

Syntax

%number = unicode:UnicodeLength

Syntax terms

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

Examples

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