arrayFindAllNoCase

Searches an array for all positions of a specified object. The function searches for simple objects such as strings and numbers or for complex objects such as structures. When the second parameter is a simple object, string searches are case-sensitive

arrayFindAllNoCase(array, object or closure) → returns array

Member Function Syntax

someArray.findAllNoCase(object or closure)

arrayFindAllNoCase Argument Reference

array array
Required

The source array to search through

object or closure variableName
Required

If string, case insensitive value to search for; if closure, use signature function (item, index, array) : boolean

Examples sample code invoking the arrayFindAllNoCase function


Script Syntax

Find the positions of a given string within a provided array regardless of case.

var fruitArray = ['apple','banana','apple','orange','kiwi'];
var applePositions = arrayFindAllNoCase(fruitArray, 'APPLE');
writeDump(applePositions);

Expected Result: [1,3].


Fork me on GitHub