From: Paul Irofti Date: 2007-11-08T22:40:11+09:00 Subject: Re: Buffer to string On 2007-11-08, elof@elof.dk wrote: > > If you really only ever care about the first string then > > s.match(/\000/).pre_match > > is an alternative which looks like it could be less work for the machine > since it can stop after the first \000 rather than have to split the entire > string. > > Are you looking at strings huge enough that efficiency at this level > matters? I think the OP made it pretty clear: there is *one* C-Style string inside a String Class buffer and wants to retrive it w/o the zero termination. -- everything is simple, we're stupid contact at gmail