listAppend: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page ListAppend to listAppend: Converting page titles to lowercase) |
No edit summary |
||
Line 6: | Line 6: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
listAppend(list, value) | listAppend(list, value) | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
listAppend(list, value, delim) | listAppend(list, value, delim) | ||
</ | </syntaxhighlight> | ||
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]] | ||
|examples= | |examples= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[r: listAppend("This, is, a", "test")] | [r: listAppend("This, is, a", "test")] | ||
</ | </syntaxhighlight> | ||
Returns This, is, a, test | Returns This, is, a, test | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[r: listAppend("This: is: a:", "test", ":")] | [r: listAppend("This: is: a:", "test", ":")] | ||
</ | </syntaxhighlight> | ||
Returns This: is: a: test | Returns This: is: a: test | ||
}} | }} | ||
[[Category:String List Function]] | [[Category:String List Function]] |
Revision as of 17:47, 15 March 2023
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", ":")]