Copyright (c) 1990 The Regents of the University of California.
All rights reserved.
This code is derived from software contributed to Berkeley by
Chris Torek.
%sccs.include.redist.man%
@(#)ffs.3 5.1 (Berkeley) 05/15/90
All rights reserved.
This code is derived from software contributed to Berkeley by
Chris Torek.
%sccs.include.redist.man%
@(#)ffs.3 5.1 (Berkeley) 05/15/90
FFS 3 ""
C 7 NAME
ffs - find first bit set in a bit string
SYNOPSIS
#include <string.h> int ffs(int value);
DESCRIPTION
Ffs finds the first bit set in
value and returns the index of that bit.
Bits are numbered starting from 1, starting at the right-most
bit.
A return value of 0 means that the argument was zero.
SEE ALSO
bitstring(3)