invert_bits.de

ldmud-3.3.719/doc/efun.de/invert_bits.de · 566 B

From the archive ldmud-3.3.719.tar.gz

Download the archive   « Back to the archive contents

SYNOPSIS
        string invert_bits(string str);

BESCHREIBUNG
        Invertiert den Status aller Bits im Bitstring <str> und liefert den
        neuen String zurueck. Dabei bleibt die Laenge von <str>, also die
        gesamte Anzahl Bits, die gleiche.

BEISPIEL
        string s;
        s = set_bit("", 3); s = set_bit(s, 4); s = set_bit(s, 15);
        --> s ist nun  "8 ("
        invert_bits(s) --> liefert "G_W"

SIEHE AUCH
        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)

Site Stats

Snippets: 1791
Codebases: 571