Contents |
Determines the index of the first array element that contains a specified substring regardless of case.
Array functions
ArrayContains(array,substring)
| Return Type | Return Description |
| number | Index of the first array element that contains substring, regardless of case. If not found, returns zero. |
| Name | Type | Required | Position | Default | Description |
| array | array | Yes | 1 | Name of an array. | |
| substring | string | Yes | 2 | A string or a variable that contains one. The search is not case-sensitive. |
<cfset fruit = Array("apples","PeachEs","oranges","bananas")> <cfif ArrayContainsNoCase(fruit,"PEACHES") NEQ 0> <cfoutput>#fruit[ArrayContainsNoCase(fruit,"PeACHes")]#</cfoutput> </cfif>
Categories: