blob: 1b725d0a39e31ad9cbcebd3b49820155227388f1 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
2 int count_bits(string str);
3
4BESCHREIBUNG
5 Diese Funktion zaehlt die Anzahl gesetzer Bits im Bitstring <str> und
6 liefert die Anzahl als Resultat zurueck.
7
8BEMERKUNGEN
9 Arbeitet eigentlich nur sinnvoll auf Bitstrings :)
10
11BEISPIEL
12 string s;
13 s = set_bit("", 3); s = set_bit(s, 15);
14 count_bits(s) --> liefert 2
15
16SIEHE AUCH
17 clear_bit(E), set_bit(E), test_bit(E), next_bit(E), last_bit(E),
18 or_bits(E), xor_bits(E), invert_bits(E), copy_bits(E), bitstrings (C)
19
2010.Apr.2007 Gloinson