Length (String function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (first pass, match syntax diagram to template and fix tags)
Line 1: Line 1:
{{Template:String:Length subtitle}}
{{Template:String:Length subtitle}}


This [[Intrinsic classes|intrinsic]] function returns the length in bytes of the method object string.
<var>Length</var> is an [[Intrinsic classes|intrinsic]] function that returns the length, in bytes, of the method object <var class="term">string</var>.


<var>Length</var> is available as of version 7.2 of the <var class=product>Sirius Mods</var>.
==Syntax==
==Syntax==
{{Template:String:Length syntax}}
{{Template:String:Length syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%len</th>
<tr><th>%length</th>
<td>A variable to receive the numeric result of the <var>Length</var> method.                                       </td></tr>
<td>A variable to receive the numeric result of the <var>Length</var> method.</td></tr>
<tr><th>string</th>
<tr><th><var class="term">string</var></th>
<td>The string to which the method is applied.</td></tr>
<td>The string to which the method is applied.</td></tr>
</table>
</table>
==Usage Notes==
<ul><li><var>Length</var> is available as of <var class="product">Sirius Mods</var> version 7.2.</ul>


==Examples==
==Examples==
 
<ol><li>
The following statement places the length of the string in %x into %y.
The following statement places the length of the string in %x into %y.
<p class="code">%y = %x:length
<p class="code">%y = %x:length
</p>
</p>
The following statement places the length of the string "Tahquamenon"
<li>The following statement places the length of the string <code>'Tahquamenon'</code> (that is, 11) into %y.
(that is, 11) into %y.
<p class="code">%y = 'Tahquamenon':length
<p class="code">%y = 'Tahquamenon':length
</p></ol>


</p>
==See also==
==See also==
{{Template:String:Length footer}}
{{Template:String:Length footer}}

Revision as of 07:01, 31 January 2011

The length of the string (String class)


Length is an intrinsic function that returns the length, in bytes, of the method object string.

Syntax

%length = string:Length

Syntax terms

%length A variable to receive the numeric result of the Length method.
string The string to which the method is applied.

Usage Notes

  • Length is available as of Sirius Mods version 7.2.

Examples

  1. The following statement places the length of the string in %x into %y.

    %y = %x:length

  2. The following statement places the length of the string 'Tahquamenon' (that is, 11) into %y.

    %y = 'Tahquamenon':length

See also