From: Bob Hutchison Date: 2002-04-24T02:14:32+09:00 Subject: Re: Is there a better way to convert between arrays and strings? On 4/23/02 11:38 AM, "ts" wrote: >>>>>> "B" == Bob Hutchison writes: > > B> a = [?a, ?b, ?c] > > I don't know if it's fast but try > > pigeon% ruby -e 'p [?a, ?b, ?c].pack("c*")' > "abc" > pigeon% Thanks. For short arrays (about 10) your method is takes about 75% of the time the loop does. For slightly longer arrays (about 140) your method takes about 30% of the time. For long arrays (about 10,000) your method takes about 10% of the time. This is better for sure, though I still wouldn't call it 'fast'. Cheers, Bob