From: Martin on
To save having to run tests what is the quickest way of finding a string in
a string?

Thanks

Martin


From: Martin on
Decided to test it

AT() then $ and InStr, followed by an array version

AT() 3x quicker than $, $ 2x quicker than Ascan version


"Martin" <spam(a)spam.spam> wrote in message
news:caU9n.117601$ni7.1103(a)newsfe24.ams2...
> To save having to run tests what is the quickest way of finding a string
> in a string?
>
> Thanks
>
> Martin
>


From: Johan Nel on
Martin,

In principle from slowest to quickest:
1. "abc" $ sMyString
2. At("abc", sMyString) > 0
3. Rat("abc", sMyString > 0
4. InStr("abc", sMyString)

So in short, InStr() is the fastest.

HTH,

Johan Nel
Pretoria, South Africa.

On Feb 2, 1:40 pm, "Martin" <s...(a)spam.spam> wrote:
> To save having to run tests what is the quickest way of finding a string in
> a string?
>
> Thanks
>
> Martin

From: Martin on
I found InStr slower than At()

Very odd

"Johan Nel" <johan.nel(a)xsinet.co.za> wrote in message
news:91a73506-8dd4-4ddc-ba74-08b449e22cd6(a)z26g2000yqm.googlegroups.com...
Martin,

In principle from slowest to quickest:
1. "abc" $ sMyString
2. At("abc", sMyString) > 0
3. Rat("abc", sMyString > 0
4. InStr("abc", sMyString)

So in short, InStr() is the fastest.

HTH,

Johan Nel
Pretoria, South Africa.

On Feb 2, 1:40 pm, "Martin" <s...(a)spam.spam> wrote:
> To save having to run tests what is the quickest way of finding a string
> in
> a string?
>
> Thanks
>
> Martin


From: Willie Moore on
Martin,

If you want more speed, use at2 or at3. They are the strongly typed versions
of at.

Regards,
Willie


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4827 (20100202) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com