string.listLast()
Gets the last element of a list.
string.listLast( delimiters=string, includeEmptyFields=boolean, count=number )
Returns: String
| Argument | Description |
|---|---|
|
delimiters
string,
optional
|
edit
Characters that separate list elements. The default value is comma. Alias: delimiter |
|
includeEmptyFields
boolean,
optional
|
edit
if set to true, empty values are included as well |
|
count
number,
optional
|
edit
specifies how many items to return from the end of the list. default is 1. |
Examples
edit listlastEX1 = "one&two&three&four";
writedump(listlastEX1.listlast('&'));
writeoutput("<br>");
listlastEX2 = "dev,LAS,lucee";
writedump(listlastEX2.listlast(''));