length: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==Function length== Returns the length of a string. ===Usage=== <source lang="mtmacro" line> [h: len = len(str, substr)] </source> ===Example=== <source lang="mtmacro" line> [r, length(...)
 
No edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==Function length==
{{MacroFunction
 
|name=length
|version=1.3b48
|description=
Returns the length of a string.
Returns the length of a string.


===Usage===
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: len = len(str, substr)]
length(str)
</source>
</syntaxhighlight>


===Example===
|example=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[r, length("abcde")]
[r, length("abcde")]
</source>
</syntaxhighlight>
Returns 5
Returns 5
}}
[[Category:String Function]]

Latest revision as of 17:43, 15 March 2023

length() Function

Introduced in version 1.3b48
Returns the length of a string.

Usage

length(str)

Example

[r, length("abcde")]
Returns 5