August 2003
Intermediate to advanced
1140 pages
68h 45m
English
Find
Find(substring, string [, startpos])Returns the position of the first occurrence of
substring in
string. If
substring isn’t found,
Find( ) returns 0. An optional starting position
for the search can be specified by the
startpos parameter. Find(
) performs a case-sensitive search. Example:
<cfset MyString="This is a case-sensitive example of using the Find function to find a substring within a string."> <cfset MySubString="find"> <cfoutput> <b>String:</b> #MyString#<br> <b>Substring:</b> #MySubstring# <p>The first occurrence of <b>#MySubstring#</b> is at position #Find(MySubstring, MyString)#. </cfoutput>