listCount: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
listCount(list) | listCount(list) | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
listCount(list, delim) | listCount(list, delim) | ||
</ | </syntaxhighlight> | ||
If delim is not specified then the default value of ',' is used as the value separator in the [[Macros:string list|string list]] | If delim is not specified then the default value of ',' is used as the value separator in the [[Macros:string list|string list]] | ||
|examples= | |examples= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[r: listCount("This, is, a, test")] | [r: listCount("This, is, a, test")] | ||
</ | </syntaxhighlight> | ||
Returns 4 | Returns 4 | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[r: listCount("This: is: a: test",":")] | [r: listCount("This: is: a: test",":")] | ||
</ | </syntaxhighlight> | ||
Returns 4 | Returns 4 | ||
}} | }} | ||
[[Category:String List Function]] | [[Category:String List Function]] |
Latest revision as of 23:59, 15 March 2023
listCount() Function
• Introduced in version 1.3b42
Returns the number of items in a string list.
Usage
listCount(list)
listCount(list, delim)
If delim is not specified then the default value of ',' is used as the value separator in the string list
Examples
[r: listCount("This, is, a, test")]
Returns 4
[r: listCount("This: is: a: test",":")]