Re: find_all() And More
- Posted by euphoric (admin) Sep 29, 2010
- 1079 views
dcole said...
euphoric said...
a = { 0, 1, 2, 3, 0 } find_all( 0, a ) -- is { 1, 5 }
Is there a lib function that will let me do a find for "anything but 0" such that it returns { 2, 3, 4 }?
I guess I could do:
a = { 0, 1, 2, 3, 0 } b = a = 0 find_all( 0, b ) -- is now { 2, 3, 4 }
I just want what's fastest. :)
Hello euphoric,
The first example is the fastest.
Don Cole
Those two examples above are not doing the same thing, so it's not apples to apples. :)