listAppend: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Added version.)
Line 1: Line 1:
{{MacroFunction
{{MacroFunction
|name=listAppend
|name=listAppend
|version=1.3b42
|description=
|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]].
Line 6: Line 7:
|usage=
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: list = listAppend(list, value)]
listAppend(list, value)
[h: list = listAppend(list, value, delim)]
</source>
<source lang="mtmacro" line>
listAppend(list, value, delim)
</source>
</source>



Revision as of 10:27, 10 March 2009

listAppend() Function

Introduced in version 1.3b42
Returns a string list with a value appended to the end of the string list.

Usage

listAppend(list, value)
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