BTW I'm using AS 2. --- Steven Loe <[EMAIL PROTECTED]> wrote:
> Subject: [Flashcoders] Beginning of String matching algorithm? > > I have a plan, but I suspect that it not a great approach: > > I have an alpha sorted xml file containing hundreds of titles. I'd like to > create an > array of items whose beginning contains my search string. > > So if the search string is "Ba" and this is my list, I'd want the 3rd and 4th > items > only: > > 10 Things I Hate About You > Agent Cody Banks > Baby Story, A > Back to the Future > Yoga for Back Care > Zona de Batalla > > My plan is: Do a binary search on the keyCode of the first letter, get all of > the > items > that start with "B". Then, use substring to see which of these items start > with "Ba" > and add these to my array. What do you think? Is there a better way to > approach this? > > Thanks for your time > > > > ____________________________________________________________________________________ > Looking for last minute shopping deals? > Find them fast with Yahoo! Search. > http://tools.search.yahoo.com/newsearch/category.php?category=shopping > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

