Hi Carlos,

here are the first 4 ideas I got

 >> profiler/test [index? find next find str #"*" #"*"] 100000 

== [0:00:00.213723]
 >> profiler/test [parse str [2 [thru "*"] here: (pos: subtract index? 
here 1)]] 100000
== [0:00:00.156568]
 >> profiler/test [parse str [2 [thru #"*"] here: (pos: subtract index? 
here 1)]] 100000
== [0:00:00.14909]
 >> profiler/test [parse str [thru #"*" to #"*" here: (pos: index? here 
)]] 100000
== [0:00:00.106628]

As you'll clearly notice, parse is your friend ;0)

I hope that helps


Ingo

Carlos Lorenz wrote:
> Hi list,
> 
> Suppose I have  str: "aaa*aaa*aaa*aaa"
> 
> Wich is the best way to get the position of second "*" at word str?
> 
> 
-- 
To unsubscribe from the list, just send an email to rebol-request
at rebol.com with unsubscribe as the subject.

Reply via email to