Name

ListPrepend

Synopsis

ListPrepend(list, element [, delimiters])

Prepends element to the beginning of list. An optional delimiter can be specified if the list is delimited with a character other than the comma (the default). The following example appends an element to the beginning of a list:

<CFSET MyList = "Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday">
<CFSET MyprependedList = ListPrepend(MyList, 'Monday')>

<CFOUTPUT>
<B>List:</B>  #MyList#<BR>
<B>Prepended List:</B> #MyPrependedList#
</CFOUTPUT>

Get Programming ColdFusion now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.