ListIndexExists()
Determines if an element at the given position exists or not
ListIndexExists( list=string, index=number, delimiter=string, includeEmptyFields=boolean );
Returns: Boolean
| Argument | Description | Default |
|---|---|---|
|
list
string,
required
|
edit
a string list |
|
|
index
number,
required
|
edit
index to check for. |
|
|
delimiter
string,
optional
|
edit
Characters that separate list elements. The default value is comma. |
, |
|
includeEmptyFields
boolean,
optional
|
edit
if set to true, empty values are included as well |
false |
Examples
edit//Simple Example
writeoutput(listIndexExists("Susi,LAS,,lucee,,,test",3));
//Member Function
strList=",I,,love,lucee,,";
writeDump(strList.listIndexExists(6));//Not exists, returns false
See also
- Lists
- Strings
- string.listIndexExists()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)