Re: Documentaion update request for "find"
- Posted by jimcbrown (admin) Sep 15, 2010
- 1096 views
"find" is working as designed; for the multi-dimentional find I would need to write my own routine that would return a sequence of nesting level and position.
Regards,
Alan
Buried in the documentation there is a find like function that does what you want in the standard library but I cannot remember its name or in which include file it is. We will be adding a table to help alleviate this problem. in the meantime, you might look at: w32findKey from the win32lib wrapper.
Yes, it is in std/search.e - find_nested() will do what is wanted.
How about "find" returning -1 if the searched sequence is not one-dimentional?
Regards,
Alan
No. Sometimes I want to do,
find("needle", {"a", "needle", "in", "a", "haystack"})
or even,
find("needle", {'a', "needle", {"in"}, "a", {"h", "aystack"})
find() works correctly with nested sequences. It just works differently than find_nested().