[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    ffs(3C) manual page Table of Contents

Name

ffs - find first set bit

Synopsis

#include <string.h>

int ffs(const int i);

MT-Level

MT-Safe

Description

ffs() finds the first bit set in the argument passed it and returns the index of that bit. Bits are numbered starting at 1 from the low order bit. A return value of zero indicates that the value passed is zero.


Table of Contents