ArrayContainsNoCase

Returns the position of the first element in the array whose string value contains the substring passed (not case sensitive), or 0 if no such element is found.

Returns: number

Usage

ArrayContainsNoCase( haystack, needle )

Arguments

Argument Description
haystack
(array, required)

The array in which to search for the substring

needle
(object, required)

The substring to search for (not case sensitive)

Examples

words           = [ 'Hello' , 'World' ];
positionOfWorld = ArrayContainsNoCase( words, 'world' ); 
Echo( positionOfWorld ); // outputs 2

See also

  • Arrays
  • function-arraycontains