Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

better than instr method

Posted on 2007-04-09
1
Medium Priority
?
249 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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
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 and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

610 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