FindNoCase

Description

Returns the first index of an occurrence of a substring in a string from a specified starting position. Returns 0 if substring is not in string. The search is case-insensitive.

Category

String functions

Syntax

FindNoCase(substring, string [, start ]) 

See also

Find, CompareNoCase, FindOneOf, REFind, Replace

Parameters

Parameter
Description
substring
String sought
string
String to search
start
Starting position for the search

Example

...
<!--- depending upon the action desired, perform
different function --->
<cfswitch expression = "#tag#">
  <cfcase value = "find">
    <cfset TheAction = Find(FORM.MyString,
     CFHTTP.FileContent, 1)>
  </cfcase>
  <cfcase value = "findNoCase">
    <cfset TheAction = FindNoCase(FORM.MyString,
     CFHTTP.FileContent, 1)>
  </cfcase>  
  <cfcase value = "findOneof">
    <cfset TheAction = FindOneOf(FORM.MyString,
     CFHTTP.FileContent, 1)>
  </cfcase>  
  <CFDEFAULTCASE>
    <cfset TheAction = Find(FORM.MyString,
     CFHTTP.FileContent, 1)>
  </CFDEFAULTCASE>
</cfswitch>
...