Alphabetical List of ColdFusion Functions
ListFindNoCase
Description
Returns the index of the first occurrence of a value within a list. Returns 0 if no value
was found. The search is case-insensitive.
Category
List functions
ListFindNoCase(list, value [, delimiters ])
Syntax
See also
ListContains
Parameters
Parameter
list
value
delimiters
Usage
Note
ColdFusion ignores empty list elements; thus, a list that is defined as "a,b,c,,,d" is
treated as a four element list.
Example
<!--- This example uses ListFind and ListFindNoCase to
determine whether substring exists in a list --->
...
</cfif>
</cfif>
</body>
</html>
,
ListFind
Description
List to search
Number or string sought among elements of list
Set of delimiters used in list
<cfset temp = ListFindNoCase(myList, FORM.myString)>
<cfif temp is 0>
<H3>An employee with that exact last name was not found</H3>
<cfelse>
<cfoutput>
<P>Employee #ListGetAt(ValueList(SearchEmpLastName.FirstName),
temp)#
#ListGetAt(ValueList(SearchEmpLastName.LastName), temp)#, of the
#ListGetAt(ValueList(SearchEmpLastName.Department), temp)#
Department, can be reached at
#ListGetAt(ValueList(SearchEmpLastName.Phone), temp)#.
<P>This was the first employee found under this case-insensitive
last name search.
</cfoutput>
</cfif>
493
Need help?
Do you have a question about the COLDFUSION 5 - CFML and is the answer not in the manual?