From: "Jan-Erik R." Date: 2009-01-13T04:37:49+09:00 Subject: Re: XOR two binary strings Gary Chris schrieb: > Howdy, > > I am having difficulty finding how to XOR 2 binary strings. > Is there a builtin function for this ? > Something like > return string_one ^ string_two > > Thanks what do you mean by binary Strings? "011101"? use Integer("0b#{binarystring}") to convert it to an integer, then use the XOR and later use String#to_s(2) to convert it back again.