arrayContainsNoCase

Used to determine if an object is in the given array, case insensitive.

arrayContainsNoCase(array, object) → returns boolean

Member Function Syntax

someArray.containsNoCase(object)

arrayContainsNoCase Argument Reference

array
Required

object
Required

Compatibility

ColdFusion:

Version 2016+ Member function is not available.

Lucee:

Returns index of first occurance

Examples sample code invoking the arrayContainsNoCase function


Basic example

CF 2016+

writeOutput(arrayContainsNoCase(["first", "SECOND"], "First"));

Member function syntax

Lucee 4+

arrayWithStrings = ["first", "SECOND"];
writeOutput(arrayWithStrings.containsNoCase("FIrst"));

Fork me on GitHub