string.listGetAt()

Gets a list element at a specified position.

string.listGetAt( position=number, delimiters=string, includeEmptyFields=boolean )

Returns: String

Argument Description
position
number, required

position of the element to return

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

Examples

strList = "lucee,core,dev";
	writeDump(strList.ListGetAt(2));
	writeOutput("<br>");
	writeDump("$2$3$41$5".ListGetAt(1,'$',true))
	writeOutput("<br>");
	strListdeli = "adobe@coldfusion@lucee@";
	writeDump(strListdeli.ListGetAt(1,"@"));

See also