From: Randy Kramer Date: 2005-03-20T05:55:24+09:00 Subject: Re: Iterating through a string and removing leading characters On Friday 18 March 2005 04:24 pm, Florian Gross wrote: > str.slice!(0) Thanks! (Can't believe I didn't recognize that approach.) > 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? Sounds like a possibility, although my first set of tests show the REs to be much faster. regards, Randy Kramer