Skip to contents

Sets the nth bit in bitstring to newvalue; the first (leftmost) bit is indexed 0. Returns a new bitstring.

Arguments

bitstring

BIT

index

INTEGER

new_value

INTEGER

Examples

if (FALSE) { # \dontrun{
set_bit('0110010'::BIT, 2, 0)
} # }