ColdFusion UDF Library - ArrayFindString
December 16th, 2008
«« Back to ColdFusion Library
Category:
ARRAY
Description:
Searches inside the specified array (array_obj) for a string matching string (str)
Parameters:
Returns:
boolean
Requires:
Sample Use:
Copy to Clipboard
Category:
ARRAY
Description:
Searches inside the specified array (array_obj) for a string matching string (str)
Parameters:
- array_obj (Array, required)
the array containing the strings you want to try to match to str - str (String, required)
the string you will be looking for in array_obj
Returns:
boolean
Requires:
Sample Use:
Copy to Clipboard
function ArrayFindString(array_obj, str){
var i = 1;
for (i = 1; i lte arrayLen(array_obj); i = i + 1)
if (array_obj[i] eq str) return true;
return false;
}
// http://www.programmers.org/index.php/coldfusion-udf-library/?ckey=1&function=ArrayFindString



