arrayFindNoCase

These functions performs a case-insensitive search in the array for the specified object. Returns the array index of the first match; 0 if not found.

arrayFindNoCase(array, object) → returns Numeric

Member Function Syntax

someArray.findNoCase(object)

arrayFindNoCase Argument Reference

array
Required

The array to search

object
Required

The value you are looking for in the array.

Examples sample code invoking the arrayFindNoCase function


Find an "Apple" in an array of Fruit

Returns the index of the element "Apple" in the array

writeOutput( arrayFindNoCase(["orange","pineapple","apple"], "Apple" ) );

Expected Result: 3


Member Functions: Find an "Apple" in an array of Fruit

Calls the findNoCase member function of the array object. Requires CF 11+ or Lucee 4.5+

fruit = ["orange","pineapple","apple"];
writeOutput( fruit.findNoCase("Apple") );

Expected Result: 3


Fork me on GitHub