listAppend: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==Function listAppend== Returns a Macros:string list with a value appended to the end of the Macros:string list. ===Usage=== <source lang="mtmacro" line> [h: list = listAppend(...)
 
m (Applied Template:MacroFunction)
Line 1: Line 1:
==Function listAppend==
{{MacroFunction
 
|name=listAppend
|description=
Returns a [[Macros:string list|string list]] with a value appended to the end of the [[Macros:string list|string list]].
Returns a [[Macros:string list|string list]] with a value appended to the end of the [[Macros:string list|string list]].


===Usage===
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: list = listAppend(list, value)]
[h: list = listAppend(list, value)]
Line 11: Line 12:
If delim is not specified then the default value of ',' is used to separate the values in the [[Macros:string list|string list]]
If delim is not specified then the default value of ',' is used to separate the values in the [[Macros:string list|string list]]


===Example===
|examples=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[r: listAppend("This, is, a", "test")]
[r: listAppend("This, is, a", "test")]
Line 21: Line 22:
</source>
</source>
Returns This: is: a: test
Returns This: is: a: test
}}
[[Category:String List Function]]

Revision as of 02:38, 9 March 2009

listAppend() Function

Returns a string list with a value appended to the end of the string list.

Usage

[h: list = listAppend(list, value)]
[h: list = listAppend(list, value, delim)]

If delim is not specified then the default value of ',' is used to separate the values in the string list

Examples

[r: listAppend("This, is, a", "test")]

Returns This, is, a, test

[r: listAppend("This: is: a:", "test", ":")]
Returns This: is: a: test