ListAppend()
Concatenates a list or element to a list.
ListAppend( list=string, value=string, delimiters=string, includeEmptyFields=boolean );
Returns: String
Examples
Example without delimiter argument:
mylist = "one,two,three";
mynewlist = listAppend(mylist, "four");
// Note that listAppend creates a new list. It doesn't update the existing list:
writeDump(mylist);
writeDump(mynewlist);
Expected result: one,two,three,four
Example with delimiter argument:
mylist = "foo";
mynewlist = listAppend(mylist, "bar", "|");
writeDump(mynewlist);
Expected result: foo|bar
See also
- Lists
- Strings
- string.listAppend()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)