SYNOPSIS

string invert_bits( string str)

DESCRIPTION

Invert the status of all bits in bitstring str and return the new string.

Note that the total number of bits (ie the string length) stays the same.

USAGE

string s;

s = set_bit("", 3);
s = set_bit(s, 4);
s = set_bit(s, 15); //s is now  "8 ("

invert_bits(s) //returns "G_W"