listCount: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) m (Macros:Functions:listCount moved to listCount) |
Verisimilar (talk | contribs) m (Corrected typo.) |
||
Line 1: | Line 1: | ||
{{MacroFunction | {{MacroFunction | ||
|name=listCount | |name=listCount | ||
| | |description= | ||
Returns the number of items in a [[Macros:string list|string list]]. | Returns the number of items in a [[Macros:string list|string list]]. | ||
Line 12: | Line 12: | ||
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= | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[r: listCount("This, is, a, test")] | [r: listCount("This, is, a, test")] |
Revision as of 02:44, 9 March 2009
listCount() Function
Returns the number of items in a string list.
Usage
[h: count = listCount(list)]
[h: count = 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",":")]