Is there a way to get an iterator to a collection item using a wild card?

Lets say for some strange reason I had a collection with the following keys:

01000000
01010000
01020000
02000000
02010000
02010100
03000000

You cannot assume the keys are kept in sorted order internally (currently they are, but they will change in the future), so you have to do this:

array string(255; $keys; 0)
get collection keys($c; $keys)
$index := find in array($keys; "02@")

if ($index > 0)
   // now you can iterate through starting at 020000000
   for ($i; $index; size of array($keys))
      $value := $c{$keys{$i}}
   end for
end if

Regards,

   Aparajita
   www.aparajitaworld.com

   "If you dare to fail, you are bound to succeed."
   - Sri Chinmoy   |   www.srichinmoylibrary.com


_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to