Length (String function): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (1 revision) |
||
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. | This [[Intrinsic classes|intrinsic]] function returns the length in bytes of the method object string. | ||
Length is available as of version 7.2 of the [[Sirius Mods]]. | Length is available as of version 7.2 of the [[Sirius Mods]]. | ||
==Syntax== | ==Syntax== | ||
{{Template:String:Length syntax}} | {{Template:String:Length syntax}} | ||
Line 13: | Line 13: | ||
<td>The string to which the method is applied.</td></tr> | <td>The string to which the method is applied.</td></tr> | ||
</table> | </table> | ||
==Examples== | ==Examples== | ||
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. | ||
%y = %x:length | %y = %x:length | ||
The following statement places the length of the string "Tahquamenon" | The following statement places the length of the string "Tahquamenon" | ||
(that is, 11) into %y. | (that is, 11) into %y. | ||
%y = 'Tahquamenon':length | %y = 'Tahquamenon':length | ||
===See also=== | ===See also=== | ||
[[List of intrinsic String methods]] | [[List of intrinsic String methods]] | ||
[[Category:Intrinsic String methods|Length function]] | [[Category:Intrinsic String methods|Length function]] | ||
[[Category:Intrinsic methods]] | [[Category:Intrinsic methods]] |
Revision as of 14:04, 19 January 2011
The length of the string (String class)
This intrinsic function returns the length in bytes of the method object string.
Length is available as of version 7.2 of the Sirius Mods.
Syntax
%length = string:Length
Syntax terms
%len | A variable to receive the numeric result of the Length method. |
---|---|
string | The string to which the method is applied. |
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