From: Rick DeNatale Date: 2006-09-04T23:28:59+09:00 Subject: Re: Ordered contrast for String or Array On 9/4/06, Trans wrote: > > Rick DeNatale wrote: > > Here's one way to do it. There are probably better ways. > > Nice! Good use of zip, and using #unpack for the String rendition makes > a lot of sense and is probably the fastest way. Thanks for these good > solutions. Beats the hek out of what I had. Well, I was surprised when I couldn't seem to find a standard String method for splitting a String into an array of single character strings. Thinking about it again, another way is string.scan /./ I haven't benchmarked the two though so I don't know which is faster. I guess that's a task for the to-do list. > > I'm going to add these to Facets, albiet I'm going to give some thought > to possibly better names. You'll get the credit of course and added to > the list of Authors/Contributors if that's okay with you. That's fine. I don't have any advice on the names, except that intersect is definitely a bad name, since it sounds too much like a set operation which would have slightly different semantics. > Thanks! > T. > > P.S. Your blog seems to be down. Something about: > SQLite3::CantOpenException in ArticlesController#index Thanks for pointing that out. This is the second time in a week that Typo has gotten me. Although this time it was just a matter of restarting it. Maybe it's time to consider migrating to Mephisto!?! -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/