• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

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>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint