Function

GLibbit_nth_lsf

Declaration [src]

gint
g_bit_nth_lsf (
  gulong mask,
  gint nth_bit
)

Description [src]

Find the position of the first bit set in mask, searching from (but not including) nth_bit upwards. Bits are numbered from 0 (least significant) to sizeof(#gulong) * 8 - 1 (31 or 63, usually). To start searching from the 0th bit, set nth_bit to -1.

Parameters

mask gulong
 

A #gulong containing flags.

nth_bit gint
 

The index of the bit to start the search from.

Return value

Returns: gint
 

The index of the first bit set which is higher than nth_bit, or -1 if no higher bits are set.