Solved

better than instr method

Posted on 2007-04-09
1
238 Views
Last Modified: 2013-11-06
I'm using instr to find x and ys in a string. For instance,


if instr(strString,"(4,3)") > 0 then
msgbox "its herE"
end if

Only I'm doing this with many values and its slow. Is there a faster method? If so please demonstrate
0
Comment
Question by:JPERKS1985
1 Comment
 
LVL 15

Accepted Solution

by:
igor_alpha earned 500 total points
ID: 18886170
Hi, JPERKS1985
Otherr methods in .net such as instr is a:
1. String.IndexOf
if strString.IndexOf("(4,3)") > 0 then
msgbox "its herE"
end if

and
2. String.Contains
if strString.Contains("(4,3)") then
msgbox "its herE"
end if

Also following opinion exists:
Instr is faster than indexOf when it is about strings.
Instr is slower than indexOf when it is about characters.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org (http://seleniumhq.org) Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now