On Fri, May 11, 2007 at 12:04:42AM +0100, Andy Armstrong wrote: > On 10 May 2007, at 23:46, Nicholas Clark wrote: > >I think that yours breaks on an empty string. > > I don't think it does. The loop never executes if len is zero. Yes, my mistake. Nicholas Clark