arrayDeleteNoCase

Deletes the first element in an array that matches the value of object.
The search is case insensitive.
Returns true if the element was found and removed.
The array will be resized, so that the deleted element doesn't leave a gap.

arrayDeleteNoCase(array, object) → returns boolean

This function requires Adobe ColdFusion 2016 and up. Not supported on Lucee, OpenBD, etc.

arrayDeleteNoCase Argument Reference

array
Required

object
Required

A string, numeric or boolean value on which to search. Case insensitive.

Compatibility

ColdFusion:

Version 2016+ Member function is not available

Examples sample code invoking the arrayDeleteNoCase function


Delete an element from an array

Deletes the first apple element from the array arr.

arr = ['apple', 'orange', 'pear', 'Apple'];
arrayDeleteNoCase(arr, 'Apple');

writeDump(arr);

Expected Result: ['orange','pear','Apple']


Fork me on GitHub