EasyCFM.COM ColdFusion Forums / ASP to CFML / What is CFML's equivalent to ASP's instr

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: What is CFML's equivalent to ASP's instr

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

r00kie
05-17-2004 @ 1:23 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 2
Joined: May 2004

Hello, I'm new to CF and I'm trying to convert the following asp code to CFML:
<%getTemp = InStr(varX, ";")
myVar = left(varX, getTemp-1)
%>

I just tried the
<cfset getTemp = InStr(varX,";")...
and it doesn't work.  Is there an equivalent to the InStr function in CF?  Thanks.



r00kie
05-17-2004 @ 1:29 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 2
Joined: May 2004

Nevermind, found the answer.

neilmerton
05-18-2004 @ 4:07 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 166
Joined: Mar 2004

so why not let others know, just incase someone has a similar question?

____________________________________
I need to read more!

Daem0nX
04-03-2005 @ 5:19 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 2
Joined: Apr 2005

Now I could be wrong because I'm new to CF code, but I believe its the "contains" command.
<cfif varY contains "varX">
Display this
</cfif>

Please correct me if I'm wrong.

pmontero810916
05-07-2005 @ 8:47 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 1
Joined: May 2005

http://livedocs.macromedia.com >> ColdFusion MX >> CFML Reference >> ColdFusion Funtion Summary >> Functions by category >> String Functions:

FindOneOf, Find, FindNoCase, ListContains, ListContainsNoCase

READ the reference


Website Designed and Developed by Pablo Varando.