listCount: Difference between revisions
Jump to navigation
Jump to search
m (→Example) |
Verisimilar (talk | contribs) m (Applied Template:MacroFunction) |
||
Line 1: | Line 1: | ||
= | {{MacroFunction | ||
|name=listCount | |||
|descriptio= | |||
Returns the number of items in a [[Macros:string list|string list]]. | |||
|usage= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: count = listCount(list)] | [h: count = listCount(list)] | ||
Line 10: | 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]] | ||
|example= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[r: listCount("This, is, a, test")] | [r: listCount("This, is, a, test")] | ||
Line 20: | Line 22: | ||
</source> | </source> | ||
Returns 4 | Returns 4 | ||
}} | |||
[[Category:String List Function]] |
Revision as of 02:42, 9 March 2009
listCount() Function
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
Example
[r: listCount("This, is, a, test")]
Returns 4
[r: listCount("This: is: a: test",":")]