Welcome! Log In Create A New Profile

Advanced

What function finds a string IN a string?

Posted by Dan M 
Dan M
What function finds a string IN a string?
July 19, 2009 09:01PM
I need to see if a string is IN another string ...

Example is "<!-- location.cfm -->" IN ...

"<CR><CR><TAB><CR><!-- location.cfm --><CR><CR><CR>"

In other languages I have used the function is "IN"

How do I accomplish this in WLanguage?

Thanks ... Dan
Jan de Bruin
Re: What function finds a string IN a string?
July 19, 2009 09:06PM
Maybe stringcount ??
Look in the help

Good luck

Jan
Bosher
Re: What function finds a string IN a string?
July 19, 2009 10:50PM
Hi

Try 'position'.

Cheers

Bosh
Dan M
Re: What function finds a string IN a string?
July 19, 2009 10:58PM
Jan,

Thanks for the direction ... it was not what I was looking for, but it worked

I set the logic up to test if the condition existed ... here is the code ...

---------------------------------------------------------------------------------------------

ErrorInResult is a int = StringCount(TestString, "<!-- location.cfm -->")

IF ErrorInResult > 0 THEN

---------------------------------------------------------------------------------------------

Thanks for your help !!

Dan
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: