in reply to how to set bits in an arbitrary length string

First of all, I don't think those substrs are doing what you think they are.... for instance, the last one probably should be:
# substr EXPR,OFFSET,LEN substr($bitmap,14,1) = 1;
(or maybe 14 should be 13, but I can't tell for sure if you wanted an offset of 14 or position 14)

Second, you can do this type bit flipping w/o the string representation with vec().

-Blake

Replies are listed 'Best First'.
Re: Re: how to set bits in an arbitrary length string
by busunsl (Vicar) on Nov 15, 2001 at 11:35 UTC
    You're right, was a mistake when I hacked it into the web form :-(