From: Georgy Date: 2004-06-06T03:33:39+09:00 Subject: Re: Chars in Ruby Thank you! That's what I wanted. I didn't think split would treat '' so specially. G-: "Shashank Date" wrote in message news:2idv9fFlbg47U1@uni-berlin.de... | | "Georgy" wrote in message | > Array to String: [97,98,99].map{|e|e.chr}.join --> "abc" | > String to Array: "abc" ????????????? --> [97,98,99] | | How about: "abc".split('').collect{|e| e[0]} | | Just applied the inverse transforms of what you did to get Array | to String ...and of course, as GR mentioned, you can pack/unpack. | | -- shanko | -- Georgy Pruss E#Mail: 'naabbcaDaddaLryDwksvKmyw'.tr('a-zA-Z','0-9a-z.@')