Whatever message this page gives is out now! Go check it out!
ListDeleteAt(list, position [, delimiters ])
ListDeleteAt(list, position [, delimiters, includeEmptyValues ])Parameter | Description |
list | A list or a variable that contains one. |
position | A positive integer or a variable that contains one. Position at which to delete element. The first list position is 1. |
delimiters | (Default: comma) A string or a variable that contains one. Characters that separate list elements. The default value is comma. If this parameter contains more than one character, ColdFusion processes each occurrence of each character as a delimiter. |
includeEmptyValues | (Default: True) If includeEmptyValues is set to false, the list will contain only nonempty elements and the element would be deleted at the specified position. |
<cfset temp2 = ListDeleteAt(temp, "3")><cfset temp2 = ListDeleteAt(temp, "3", ";")><cfscript>
myList="Tokyo,Bangkok,Jakarta,Manila,Bangalore,Shanghai";
WriteOutput(ListDeleteAt(myList,3) & " * "); //Deletes Jakarta at index 3
mySecondList="London,Paris|Sau Paulo,Santiago,Buenos Aires|New York,Montreal,Seattle|Tokyo,Shanghai";
WriteOutput(ListDeleteAt(mySecondList,3,"|")); //Deletes index 3 using custom delimiter
</cfscript>