Description

This function searches an array for the presence of a specified object. The function searches for simple objects such as strings and numbers or for complex objects such as structures. Simple object string searches are case-insensitive. This function does not support searches for COM and CORBA objects.

Returns

Yes, if the specified object exists in the array.

Category

Array functions

History

  • Adobe ColdFusion (2018 release): Made the following changes:
    • Parameter List is renamed to array.
    • Parameter elementToBeSearched is renamed to value.
  • Adobe ColdFusion (2016 release): Added the function

Syntax

ArrayContainsNoCase(array, value)

See also

ArrayContains, ArrayFind, ArrayFindNoCase

Parameters

Parameter

Description

array

Name of the array.

value Object to search for.

Example

<cfscript>
   myArray=["Boat","Car"];
   WriteOutput(ArrayContainsNoCase(myArray,"boat") & " | "); //returns YES since "Boat" is a member of myArray
   WriteOutput(ArrayContainsNoCase(myArray,"train")); //returns NO since "Train" is not a member of myArray
</cfscript>

Output

YES | NO

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy