Length (String function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (printtext)
m (1 revision)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:String:Length subtitle}}
{{Template:String:Length subtitle}}


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


==Syntax==
==Syntax==
Line 14: Line 14:


==Usage Notes==
==Usage Notes==
<ul><li><var>Length</var> is available as of <var class="product">[[Sirius Mods|"Sirius Mods"]]</var> version 7.2.</ul>
<ul><li><var>Length</var> is available as of <var class="product">[[Sirius Mods|Sirius Mods]]</var> version 7.2.</ul>


==Examples==
==Examples==

Latest revision as of 18:29, 2 November 2012

The length of the string (String class)


The Length 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

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