ListQualifiedToArray()
Copies the elements of a list to an array.
Introduced: 5.3.7.17
ListQualifiedToArray( list=string, delimiter=string, qualifier=string, qualifierRequired=boolean, includeEmptyFields=boolean );
Returns: Array
| Argument | Description | Default |
|---|---|---|
|
list
string,
required
|
edit
a string list |
|
|
delimiter
string,
optional
|
edit
a single character that separate list elements. Alias: delimiters |
, |
|
qualifier
string,
optional
|
edit
a single character before and after the list elements. Alias: qualifiers |
" |
|
qualifierRequired
boolean,
optional
|
edit
if set to true, all values need to have qualifier (quotes) around them. |
false |
|
includeEmptyFields
boolean,
optional
|
edit
if set to true, empty values are included as well |
false |
Examples
edit list = "I'love'lucee";
arr = listQualifiedToArray(list, "'");
writeDump(arr)
See also
- Lists
- Strings
- Arrays
- string.listQualifiedToArray()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)