ArrayToList()
Transform the array to a list of elements delimiter by the given string
ArrayToList( array=array, delimiter=string );
Returns: String
| Argument | Description | Default |
|---|---|---|
|
array
array,
required
|
edit
Name of array |
|
|
delimiter
string,
optional
|
edit
Character or multicharacter string to separate list elements. The default value is comma. Alias: delimiters |
, |
Examples
editConvert an array to a list (optional delimiter)
newArray = ['a','b','c','b','d','b','e','f'];
dump(arrayToList(newArray));
// member function, with custom separator
dump(newArray.toList('--'));
See also
- Arrays
- Lists
- Strings
- array.toList()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)