Skip to main content

set_bit

Discworld driver help

set_bit

Name

set_bit() - set a bit in a bitstring

Synopsis

string set_bit( string str, int n );

Description

Return the new string where bit `n' is set in string `str'. Note that the old string `str' is not modified.

The max value of `n' is limited. Ask the administrator if you want to know the maximum value.

The new string will automatically be extended if needed.

Bits are packed 6 per byte in printable strings.

See also

clear_bit(), test_bit()