bitset v0.2.1 Bitset View Source

Documentation for Bitset. the fixed-size N bits

Link to this section Summary

Functions

the number of bits set to true

toggle all bits

toggle the bit at the position

sets all bits to false

sets the bit at the position to false

sets all bits to true

sets the bit at the position to bit value

to_binary(bitset) deprecated

convert to binary format

return Bitset data binary

return string representation of the bitset

Link to this section Types

Link to this type

t() View Source
t() :: %Bitset{data: term(), size: term()}

Link to this section Functions

the number of bits set to true

toggle all bits

toggle the bit at the position

sets all bits to false

sets the bit at the position to false

sets all bits to true

Link to this function

set(bitset, pos, bit \\ 1) View Source
set(Bitset.t(), integer(), integer()) :: Bitset.t()

sets the bit at the position to bit value

Link to this function

to_binary(bitset) View Source
to_binary(Bitset.t()) :: bitstring()

This function is deprecated. Use to_bytes/1 instead.

convert to binary format

Link to this function

to_bytes(bitset) View Source (since 0.2.1)
to_bytes(Bitset.t()) :: bitstring()

return Bitset data binary

Link to this function

to_string(bitset, acc \\ <<>>) View Source
to_string(bitstring() | Bitset.t(), bitstring()) :: binary()

return string representation of the bitset