listCount: Difference between revisions
Jump to navigation
Jump to search
(New page: ==Function listAppend== Returns the number of items in a Macros:string list. ===Usage=== <source lang="mtmacro" line> [h: count = listCount(list, value)] [h: count = listCount(list, ...) |
|||
Line 1: | Line 1: | ||
==Function | ==Function listCount== | ||
Returns the number of items in a [[Macros:string list|string list]]. | Returns the number of items in a [[Macros:string list|string list]]. |
Revision as of 01:33, 29 January 2009
Function listCount
Returns the number of items in a string list.
Usage
[h: count = listCount(list, value)]
[h: count = listCount(list, value, 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")]
Returns 4