From: David Garamond Date: 2004-02-25T23:54:07+09:00 Subject: Re: bitwise AND, OR, XOR, NOT for strings? Ara.T.Howard wrote: >>What do people think of adding String#&, String#|, String#^, and >>String#~? I find it useful sometimes in Perl. In Ruby currently I have >>to convert each byte to integer first, rather slow (actually slow as >>mollasses... :-) >> >>There are BitSet and BitVector modules (and another one which I forgot >>for doing bit operations) but ironically none of them currently >>provide an easy way to xor two strings together. > > this is a great idea. it might also be useful to have > > String.and! other > String.or! other > String.xor! other > String.not! > > which did not create copies. Thanks for the responses. I'm gonna try submitting this as an RCR. -- dave