How to find the first occurrence of a substring in a string (case insensitive) in ColdFusion

FindNoCase() - find the first occurrence of a substring in a string (case insensitive)

FindNoCase.cfm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>FindNoCase function example: how to find the first occurrence of a substring in a string (case insensitive)</title>
</head>

<body>
<h2 style="color:hotpink">FindNoCase Function Example [Case insensitive]</h2>

<cfset MyString="Finds the first occurrence of a substring in a string, from a specified start position.">
<cfoutput>
<b>MyString:</b> #MyString#
<br />
<b>
MyString[FindNoCase "String"]: #FindNoCase("string",MyString,0)#
</b>
</cfoutput>

<br /><br />
<cfset MyString="Finds the first occurrence of a substring in a string, from a specified start position.">
<cfoutput>
<b>MyString:</b> #MyString#
<br />
<b>
MyString[FindNoCase "f"]: #FindNoCase("f",MyString,0)#
</b>
</cfoutput>

</body>
</html>






More ColdFusion examples