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 array
Required

object any
Required

Compatibility

Lucee:

Returns index of first occurrence

ColdFusion:

Version 2016+ Member function is not available.

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