Florian Gross <flgr / ccan.de> writes:

> Randy Kramer wrote:
>
>>    * ?? (Is there any method which chops the first character from
>> the string?  How efficient is that (especially compared to the
>> method described in the next bullet).
>
> str.slice!(0)
>
> I think this is actually fairly efficient, but I suppose there's a
> memmove involved at the C level.
>
> Perhaps you could set the characters you don't need to '\0' and remove
> all of them after the iteration has ended with a Regexp?

Better use String#delete! for that, no?

-- 
Christian Neukirchen  <chneukirchen / gmail.com>  http://chneukirchen.org