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 MX, 2nd Edition 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.