[Main page] [Overview]     /efun /invert_bits

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.

EXAMPLES
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"

SEE ALSO
set_bit(E), clear_bit(E), test_bit(E), last_bit(E), and_bits(E),
or_bits(E), xor_bits(E), count_bits(E), copy_bits(E)