From: Florian Gross Date: 2005-03-19T06:24:58+09:00 Subject: Re: Iterating through a string and removing leading characters 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?