string.listLast()

Gets the last element of a list.

string.listLast( [ delimiters [, includeEmptyFields [, count ] ] ] )

Returns: String

Argument Description
delimiters
string, optional

Characters that separate list elements. The default value is comma.

Alias: delimiter

includeEmptyFields
boolean, optional

if set to true, empty values are included as well

count
number, optional

specifies how many items to return from the end of the list. default is 1.

Examples

listlastEX1 = "one&two&three&four";
	writedump(listlastEX1.listlast('&'));
	writeoutput("<br>");
	listlastEX2 = "dev,LAS,lucee";
	writedump(listlastEX2.listlast(''));

See also