From: darren kirby Date: 2007-12-27T03:35:48+09:00 Subject: Re: fastest way to remove this strange character quoth the Junkone: > Hello > I was trying out the roo gem and encountered this issue. when i do a > object.sheets, it seems to spit out the array and adds \000 for every > letter of the sheet name > for eg. > currentTrade becomes c\000u\000r\000r\000e\000n\000t\000T\000r\000a > \000d\000e\000 > > which is the fastest way to remove \000 from the array. irb> s = "c\000u\000r\000r\000e\000n\000t\000T\000r\000a\000d\000e\000" irb> n = "" irb> s.unpack("S*").each {|c| n << c.chr} => [99, 117, 114, 114, 101, 110, 116, 84, 114, 97, 100, 101] irb> n => "currentTrade" Not sure if this is fastest or 'best'... -d -- darren kirby :: Part of the problem since 1976 :: http://badcomputer.org "...the number of UNIX installations has grown to 10, with more expected..." - Dennis Ritchie and Ken Thompson, June 1972