Subject: [ruby-talk:20424] Re: Performance of Substrings
From: kamphausen novelscience.com (SKa)
Date: Mon, 27 Aug 2001 19:16:58 +0900
References: 2029020292
> Have you tried with unpack ?
>
> def iso_unformat(t)
> t.size == 8 ? t.unpack("a4a2a2") : t.unpack("a4a2a2a2a2a2")
> end
Much better :) (though still slow in a way)
Thanks Guy.
stefan