Hmmm. Isn't that implied in:
<CFIF findnocase(substr,str,pos>
found, do something
<CFELSE>
not found do something else
</CFIF>
?
I am personally in favor of using functions that return integers in a
fashion that allows them to be used as boolean answers.
DC
----- Original Message -----
From: "Simon Horwith" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, November 14, 2000 19:27
Subject: RE: contains
> I apologize... didn't finish reading before I'd already replied.
> How about:
> <cfif FindNoCase("peter", tmpstr, 1) IS NOT 0>
>
> ~Simon
>
> > Simon Horwith
> > Certified ColdFusion Developer
> > Fig Leaf Software
> > 1400 16th St NW, # 220
> > Washington DC 20036
> > 202.797.6570 (direct line)
> > www.figleaf.com
> >
>
>
> -----Original Message-----
> From: Peter Benoit [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 14, 2000 2:08 PM
> To: CF-Talk
> Subject: contains
>
>
> If I have a string like:
>
> <cfset tmpstr ="thisismystringpeterthatwasmystring">
>
> how can I find "peter" in that mess?
>
> I tried
>
> <cfif tmpstr contains "peter">
>
> and
>
> <cfif FindNoCase("peter",tmpstr)>
>
> but neither one worked. Could someone tell me what I'm doing wrong?
>
> Thanks,
> Pete
>
>
> --------------------------------------------------------------------------
--
> --------------------
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send
a
> message with 'unsubscribe' in the body to
[EMAIL PROTECTED]
> --------------------------------------------------------------------------
----------------------
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send
a message with 'unsubscribe' in the body to
[EMAIL PROTECTED]
>
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]