412
ListContainsNoCase
Returns the index of the first element of a list that contains the specified substring
within elements. The search is case-insensitive. If no element is found, returns 0.
See also
Syntax
ListContainsNoCase( list , substring [, delimiters ])
list
List being searched.
substring
String being sought in elements of list.
delimiters
Set of delimiters used in list.
Examples
<!--- This example shows ListContainsNoCase --->
<HTML>
<HEAD>
<TITLE>ListContainsNoCase Example</TITLE>
</HEAD>
<BODY BGCOLOR=silver>
<H3>ListContainsNoCase Example</H3>
<CFIF IsDefined("FORM.letter")>
<!--- First, query to get some values for our list --->
<CFQUERY NAME="GetParkInfo" DATASOURCE="cfsnippets">
SELECT
FROM
WHERE PARKNAME LIKE '#FORM.letter#%'
</CFQUERY>
<CFSET tempList = ValueList(GetParkInfo.City)>
<CFIF ListContainsNoCase(tempList, FORM.yourCity) is not 0 OR
FORM.yourCity is "">
<P><CFIF FORM.yourCity is "">The list of parks for the letter
<CFOUTPUT>#FORM.Letter#</CFOUTPUT>
...
ListContains
and ListFindNoCase.
PARKNAME,CITY,STATE
PARKS
CFML Language Reference
Need help?
Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?
Questions and answers