Solved

better than instr method

Posted on 2007-04-09
1
243 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Add jar to project library in intellij idea 3 415
debug as  junit test 4 88
MAC and PC - Cheap video editing tools 4 151
What is the Best Editor for PHP Development ? 5 92
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ā€¦
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
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 synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

730 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