MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | SYNOPSIS |
| 2 | string invert_bits(string str); |
| 3 | |
| 4 | BESCHREIBUNG |
| 5 | Invertiert den Status aller Bits im Bitstring <str> und liefert den |
| 6 | neuen String zurueck. Dabei bleibt die Laenge von <str>, also die |
| 7 | gesamte Anzahl Bits, die gleiche. |
| 8 | |
| 9 | BEISPIEL |
| 10 | string s; |
| 11 | s = set_bit("", 3); s = set_bit(s, 4); s = set_bit(s, 15); |
| 12 | --> s ist nun "8 (" |
| 13 | invert_bits(s) --> liefert "G_W" |
| 14 | |
| 15 | SIEHE AUCH |
| 16 | set_bit(E), clear_bit(E), test_bit(E), last_bit(E), and_bits(E), |
| 17 | or_bits(E), xor_bits(E), count_bits(E), copy_bits(E) |