ffs(3) — Subroutines
NAME
ffs − Find first set bit
SYNOPSIS
#include <strings.h>
int ffs(
int pattern );
LIBRARY
Standard C Library (libc)
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
ffs(): XPG4-UNIX
Refer to the standards(5) reference page for more information about industry standards and associated tags.
PARAMETERS
pattern
Specifies the bit pattern searched.
DESCRIPTION
The ffs() function finds the first bit set (beginning with the least significant bit) and returns the index of that bit. Bits are numbered starting at 1 (the least significant bit). If pattern is 0 (zero), ffs() returns 0.
SEE ALSO
Standards: standards(5)