From: "Michael W. Ryder" <_mwryder@...> Date: 2008-01-28T17:20:24+09:00 Subject: Logical Operations on Strings Is there a bitwise and for strings that I am missing? I tried the documentation and Google with no luck. I coded a simple method to handle this, it obviously needs more error checking, but don't want to reinvent the wheel if not necessary. def AND(s, m) t = s.dup for i in 0...(s.size <= m.size ? s.size : m.size) t[i] = (s[i] & m[i]).chr end return t end On a related note, is there any way to create a string from a hex number other than separating each two digits and using .chr to convert them to a number and adding them to the string? If I have a string such as 0x7FFFFFFFFFFF I have to use something like str1 = 0x7F.chr followed by 5 str1 << 0xFF.chr which seems to be unnecessarily clumsy.