Length (String function): Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (1 revision) |
||
(30 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{Template:String:Length subtitle}} | |||
The <var>Length</var> [[Intrinsic classes|intrinsic]] function that returns the length, in bytes, of the method object <var class="term">string</var>. | |||
[[ | |||
==Syntax== | |||
[[ | {{Template:String:Length syntax}} | ||
===Syntax terms=== | |||
<table class="syntaxTable"> | |||
<tr><th>%length</th> | |||
<td>A variable to receive the numeric result of the <var>Length</var> method.</td></tr> | |||
<tr><th>string</th> | |||
<td>The <var class="term">string</var> to which the method is applied.</td></tr> | |||
</table> | |||
==Usage Notes== | |||
<ul><li><var>Length</var> is available as of <var class="product">[[Sirius Mods|Sirius Mods]]</var> version 7.2.</ul> | |||
==Examples== | |||
<ol><li> | |||
The following statement places the length of the string in %x into %y. | |||
<p class="code">%y = %x:length | |||
</p> | |||
<li>The following statement places the length of the string <code>'Tahquamenon'</code> (that is, 11) into %y. | |||
<p class="code">%y = 'Tahquamenon':length | |||
</p></ol> | |||
==See also== | |||
{{Template:String:Length footer}} |
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
- Length is available as of Sirius Mods version 7.2.
Examples
-
The following statement places the length of the string in %x into %y.
%y = %x:length
- The following statement places the length of the string
'Tahquamenon'
(that is, 11) into %y.%y = 'Tahquamenon':length