BogaNet 1.4.0
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
BogaNet.Helper.ByteHelper Class Reference

Helper methods for byte. More...

Static Public Member Functions

static bool IsBitSetAtIndex (byte value, byte index)
 Determine if the bit at the provided index is set (indexed from left-to-right).
 
static byte SetBitAtIndex (byte value, byte index)
 Set the bit value at the provided index (indexed from left-to-right).
 
static byte ClearBitAtIndex (byte value, byte index)
 Clear the bit value at the provided index (indexed from left-to-right).
 
static byte ToggleBitAtIndex (byte value, byte index)
 Toggle the bit value at the provided index (indexed from left-to-right).
 

Detailed Description

Helper methods for byte.

Member Function Documentation

◆ ClearBitAtIndex()

static byte BogaNet.Helper.ByteHelper.ClearBitAtIndex ( byte value,
byte index )
static

Clear the bit value at the provided index (indexed from left-to-right).

Parameters
valueThe byte value whose bit to clear
indexThe index of the bit to clear
Returns
The mutated byte value

◆ IsBitSetAtIndex()

static bool BogaNet.Helper.ByteHelper.IsBitSetAtIndex ( byte value,
byte index )
static

Determine if the bit at the provided index is set (indexed from left-to-right).

Parameters
valueThe byte whose index to check
indexThe bit index to check
Returns
The mutated byte value

◆ SetBitAtIndex()

static byte BogaNet.Helper.ByteHelper.SetBitAtIndex ( byte value,
byte index )
static

Set the bit value at the provided index (indexed from left-to-right).

Parameters
valueThe byte value whose bit to set
indexThe index of the bit to set
Returns
The mutated byte value

◆ ToggleBitAtIndex()

static byte BogaNet.Helper.ByteHelper.ToggleBitAtIndex ( byte value,
byte index )
static

Toggle the bit value at the provided index (indexed from left-to-right).

Parameters
valueThe byte value whose bit to toggle
indexThe index of the bit to toggle
Returns
The mutated byte value

The documentation for this class was generated from the following file: