Name
ListSetAt
Synopsis
ListSetAt(list, position, value
[,delimiters
])
Sets value
at specified
position
, overwriting the element already
occupying that space. An optional delimiter can be specified if the
list is delimited with a character other than the comma (the
default). Here’s an example that replaces the value in the
third element of the list with a new value:
<CFSET MyList = "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday"> <CFSET MyNewList = ListSetAt(MyList, 3, "Humpday")> <CFOUTPUT> <B>Original List:</B> #MyList#<BR> <B>New List:</B> #MyNewList# </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.