ListPrepend

Inserts an element at the beginning of a list.

ListPrepend( list, value [, delimiters ] )

Returns: String

Argument Description Default
list
string, required

a string list

value
string, required

An element or a list of elements.

delimiters
string, optional

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

Alias: delimiter

,

Examples

//Simple Example
writeoutput(listPrepend("Susi,LAS,,lucee,,,test","Inserted"));
//Member Function
strList=",I,,love,lucee,,";
writeDump(strList.listPrepend("First"));

See also