-
Notifications
You must be signed in to change notification settings - Fork 336
/
arrayfindnocase.json
44 lines (42 loc) · 2.11 KB
/
arrayfindnocase.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
"name":"arrayFindNoCase",
"type":"function",
"syntax":"arrayFindNoCase(array, value or callback)",
"member":"someArray.findNoCase(value or callback)",
"returns":"numeric",
"related":["arrayContains","arrayFind","arrayFindNoCase","arrayFindAll","arrayFindAllNoCase"],
"description":"These functions performs a case-insensitive search in the array for the specified value. Returns the array index of the first match; 0 if not found.",
"params": [
{"name":"array","description":"The array to search","required":true,"default":"","type":"array","values":[]},
{"name":"value or callback","description":"The value you are looking for in the array.","required":true,"default":"","type":"any","values":[]}
],
"engines": {
"coldfusion": {"minimum_version":"9", "notes":"", "docs":"https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-a-b/arrayfindnocase.html"},
"lucee": {"minimum_version":"", "notes":"", "docs":"https://docs.lucee.org/reference/functions/arrayfindnocase.html"},
"railo": {"minimum_version":"", "notes":"", "docs":"http://railodocs.org/index.cfm/function/arrayfindnocase"},
"openbd": {"minimum_version":"", "notes":"", "docs":"http://openbd.org/manual/?/function/arrayfindnocase"}
},
"links": [
],
"examples": [
{
"title":"Find an \"Apple\" in an array of fruit",
"description":"Returns the index of the element \"Apple\" in the array",
"code":"writeOutput( arrayFindNoCase([\"orange\",\"pineapple\",\"apple\"], \"Apple\" ) );",
"result":"3"
},
{
"title":"arrayFind is not Case Sensitive",
"description":"Not case sensitive so \"Apple\" will be found in the array, returns 1. Use arrayFind for case sensitive matching.",
"code":"writeOutput( arrayFindNoCase([\"orange\",\"pineapple\",\"apple\"], \"Apple\") );",
"result":"1",
"runnable":true
},
{
"title":"Member Functions: Find an \"Apple\" in an array of fruit",
"description":"Calls the findNoCase member function of the array object. Requires CF11+ or Lucee4.5+",
"code":"fruit = [\"orange\",\"pineapple\",\"apple\"];\nwriteOutput( fruit.findNoCase(\"Apple\") );",
"result":"3"
}
]
}